/* preLoad image */
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/*
pop-up window code
Author: Eric King http://redrival.com/eak/
*/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);}
	
	/* 
	pop-up window usage:
	<a href="page.htm" onclick="NewWindow(this.href,'main','800','450','no','center');return false">link_here</a>
	*/
	
	/* MM jump menus */
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
	}
	
	// open new page from jump menus
	function there(dropdown) {
		//	var windowprops = "location=yes,scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes,status=yes";
		var URL = dropdown.options[dropdown.selectedIndex].value;
		if(URL!="") {
			// window.open(URL,"new",windowprops);
			window.open(URL,"new", "");
			}
			}
			
			/* rollOvers */
	function init() {
	if (!document.getElementById) return
	var imgOriginSrc;
	var imgTemp = new Array();
	var imgarr = document.getElementsByTagName('img');
	for (var i = 0; i < imgarr.length; i++) {
		if (imgarr[i].getAttribute('hsrc')) {
			imgTemp[i] = new Image();
			imgTemp[i].src = imgarr[i].getAttribute('hsrc');
			imgarr[i].onmouseover = function() {
				imgOriginSrc = this.getAttribute('rsrc');
				this.setAttribute('src',this.getAttribute('hsrc'))
			}
			imgarr[i].onmouseout = function() {
				this.setAttribute('src',imgOriginSrc)
			}
		}
	}
}
onload=init;

function gotoFaq(what) {
	if (what.value != "") {
		location = "/expert/index.php?nodecode=" + what.value + "&historystring=" + what.options[what.selectedIndex].text;
	}
}
