//Define variables
var isNav, isIE
var imgoff='/images/spacer.gif';
var imgon="/images/mar.gif";
var imgon_ns="/images/mar_ns.gif";
var txtoff='ffffff';
var txton='000000';
var bgcoloff='088CD6';
var bgcolon='EEEFFF';
var cursoroff='';
var cursoron='hand';
var mocolor='FFFFE3'; // mouse over td color
var mooddcolor='FFFFFF'; // mouse over odd td color
var moevencolor='EEEEEE'; // mouse over even td color

if (parseInt(navigator.appVersion) >=4 ) {
	if (navigator.appName == "Netscape") {
		isNav = true
	} else {
		isIE = true
		col1 = "all."
		styleObj = ".Style"
	}
}

function seton(i) {
	if (isNav == true) {
		var im=eval("document."+"im"+i);
		im.src=imgon_ns;
	} else {
		var im=eval("document.all."+"im"+i);
		im.src=imgon;
		var tx=eval("document.all."+"tx"+i);
		tx.color=txton;
		var td=eval("document.all."+"td"+i);
		td.style.backgroundColor=bgcolon;
		td.style.cursor=cursoron;	
		var td2=eval("document.all."+"td"+i+"_2");
		td2.style.backgroundColor=bgcolon;
		td2.style.cursor=cursoron;			
	}
}

function apse(what) {
		what.style.backgroundColor=bgcolon;
		what.style.cursor=cursoron;	
}

function setoff(i) {
	if (isNav == true) {
		var tx=eval("document."+"im"+i);
		tx.src=imgoff;
	} else {
		var tx=eval("document.all."+"im"+i);
		tx.src=imgoff;
		var tx=eval("document.all."+"tx"+i);
		tx.color=txtoff;
		var td=eval("document.all."+"td"+i);
		td.style.backgroundColor=bgcoloff;
		td.style.cursor=cursoron;		
		var td2=eval("document.all."+"td"+i+"_2");
		td2.style.backgroundColor=bgcoloff;
		td2.style.cursor=cursoron;			
		
	}
}

function mo(what) {
	what.style.backgroundColor=mocolor;
	what.style.cursor='default';	
}

function muo(what) {
	what.style.backgroundColor=mooddcolor;
}

function mue(what) {
	what.style.backgroundColor=moevencolor;
}

function MM_openBrWindow(theURL,winName,features) { 
  wn=window.open(theURL,winName,features);
  wn.focus();

}

function MM_openSymbolWindow(frmname,fldname) { 
  wn=window.open('/findsymbol.cfm?frmname='+frmname+'&fldname='+fldname,'help','width=450,height=400,resizable,scrollbars');
  wn.focus();

}
function opentradeswindow(code) { 
  wn=window.open('/trades.cfm?code='+code,'trades','width=200,height=450,resizable=no,scrollbars');
  wn.focus();
}

function opendepthwindow(code,language) { 
//  wn=window.open('/depth/depth.cfm?code='+code,'depth','width=340,height=550,resizable=no,scrollbars');
  wn=window.open('/depth/depth.cfm?lang='+language+'&code='+code,'help','width=450,height=400,resizable,scrollbars');  
  wn.focus();

}

function ofh(ff_id) { 
  wn=window.open('/help/ff.cfm?ff_id='+ff_id,'fh','width=400,height=550,resizable=no,scrollbars');
  wn.focus();
}


function doNothing() {
}

function SendSymbol(what,toform,tofield){
	a=eval('opener.document.'+toform+'.'+tofield)
	a.value=what;
	this.window.close()
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+document.forms.gotoform.hcode.value+"'");
  if (restore) selObj.selectedIndex=0;

}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}


function SubmitForm(){

	var index = document.forms['myform'].doit.selectedIndex;
	
	if (isNav == true) {	
		var t = document.forms['myform'].doit[index].value;	
	}
	else {
		var t = document.forms['myform'].doit.item(index).value;
	}
	
	var hcode = document.forms['myform'].hcode.value;
	
	document.forms['myform'].action = t+hcode;
	document.forms['myform'].submit();
}

function MM_openEmailWindow(theURL,winName,features) { 
  wn=window.open(theURL+'&url='+window.location,winName,features);
  wn.focus();

}

function recover()
{
	location.reload()
}





