var isIE = true;
var isNS = 0;
var isMac = 0;
var isAOL = 0;	
var winDisp;
var bSearch = true;

document.onkeydown = subS;

var MM_contentVersion = 6
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0
	
if (plugin) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ")
    for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i]))) 
		continue
		var MM_PluginVersion = words[i]
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion
}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n')
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n')
	document.write('</SCR' + 'IPT\> \n')
}



function chkNum(o,p) {
		
	var frm = document.forms[1]		
	if (window.Event){
		uKey = e.which;
	}else{
		uKey = event.keyCode;
	}						
	//window.status = uKey
	var sNum = o.value
	//alert(sNum.indexOf('.'))
	var pnt = 46
	if (p!=1) {if (sNum.indexOf('.') < 0) {pnt = 45}}
	if (!((uKey > pnt && uKey < 58) && uKey != 47)) {				
		if (window.Event){
			e.which = null
		}else{
			event.keyCode = null
		}			
	}		
}


function doNew() {			
	var frm = document.forms[1]
	
	//alert(frm.action)
	
	if (frm.selAcc.value > 0) {
		frm.txtTy.value = frm.selAcc.value
		frm.submit()
	}else{			
		//alert('Select the type of account...')
		frm.selAcc.focus()
	}			
}		

function display(c,g,s,q,l1,l2,i,o) {
if (!winDisp || winDisp.closed) {
	winDisp = window.open("HS_display.asp?c=" + c + "&t=display&g=" + g + "&s=" + s + "&q=" + q + "&l1=" + l1 + "&l2=" + l2 + "&i=" + i + "&o=" + o, "winDisp", "dependent=true,width=850,height=680")
	if (!winDisp.opener) {
		winDisp.opener = window;
	}
}else{
	//winDisp.setImg(c);
	winDisp.location.href = "HS_display.asp?c=" + c + "&t=display&g=" + g + "&s=" + s  + "&q=" + q + "&l1=" + l1 + "&l2=" + l2 + "&i=" + i + "&o=" + o;
	winDisp.focus();						
	}		
}

function refShop(t,g,s) {
	document.location.href = "main.asp?t=" + t + "&g=" + g + "&o=" + s 
}

function subS(e) {
	if (window.Event){
		entKey = e.which;
		if (entKey == 13) {
			goSubmit();
		}
	}else{
		entKey = event.keyCode;
	}
}

function goSubmit(a) {	
	if (a == 'a') {	
		var frm = document.forms[0];
		frm.submit();
	}
}

function goM(url,t,g,s,u,w) {
	if (t == 'group') {
		document.location.href = 'main.asp?t='+t+'&g='+g+'&s='+s+'&m='+s+'&u='+u;
	}else{
		if (url != '') {		
			//, "dependent=true,width=850,height=680"		
			if (w == 2) {
				//if (!winDisp || winDisp.closed) {
					winDisp = window.open(url, "winDisp")
					//if (!winDisp.opener) {
						winDisp.opener = window;
					//}
				//}else{
				//	winDisp.location.href = url
					winDisp.focus();						
				//}
			////}else if (w == 0) {
			////	document.location.href = 'main.asp?url='+url+'&t='+t+'&g='+g+'&s='+s+'&m='+s+'&u='+u;
			}else{
				document.location.href = url
			}	
		}else{
			document.location.href = 'main.asp?g='+g+'&s='+s+'&u='+u;
		}	
	}	
}

function ancU(obj,me) {
	if (me == 1) {
		obj.className = "mEU";
	}else{
		obj.className = "U";
	}	
}

function ancD(obj) {
	obj.className = ""  //mM"
}

function ancM(obj) {
	if (obj != null) {obj.className = "mM"}
}

function HiLi(n,s,a) {				
}	
