﻿// JScript File

	function SetMenuItem(item,state){
		if(state=="on"){
			item.style.background='#FCE99E';
			item.style.border='1px solid #000000';
		}else{
			item.style.background='';
			item.style.border='';		
		}
	}
	
	function SetDataItem(item,state){	
		if(state=="on"){
			item.style.background='#FCE99E';
		}else{
			item.style.background='';
		}
	}

	function MenuLink(vm){
		location.href='jtclient.asp?vm='+vm;
	}
	
	function LaunchHelp(){
		alert("Help and Support is currently disabled.");
		//window.showModalDialog('Help/default.htm',window,'dialogHeight:600px;dialogWidth:500px;status:no;unadorned:no;help:0;resizable:0;scroll:1');
	}
	
	function GetJobDetails(a){
		window.showModalDialog('jbdtl.asp?id='+a,window,'dialogHeight:460px;dialogWidth:630px;status:no;unadorned:no;help:0;resizable:0;scroll:0');
		//window.open('jbdtl.asp?id='+a);
	}
	
	function ActivateAccount(){		
		var Xpos = (screen.width-410)/2 ;	
		var Ypos = (screen.height-308)/2 ;	
		documentWindow = window.open('activate.asp?id='+<%=session.SessionID %>,'Activate','toolbar=no,location=no,status=no,scrollbars=no,width=410,height=308,screenX="+Xpos+",screenY='+Ypos+',Left='+Xpos+',Top='+Ypos)	
		//window.showModalDialog('activate.asp?id='+<%=session.SessionID %>,window,'dialogHeight:340px;dialogWidth:415px;status:no;unadorned:no;help:0;resizable:0;scroll:0');
	}
	
	function SortData(p_sSortType,p_sSortOrder){
		location.href='?vm=<%=nViewMode%>&st='+p_sSortType+'&so='+p_sSortOrder;
	}

	function SetClientSession(p_ID){
		location.href="?action=setclient&id="+p_ID;
	}

	function doLogin(){
		document.frmLogin.btnSubmit.value='Please wait...';
		document.frmLogin.btnSubmit.disabled=true;
		return true;
	}

	function InitActivation(){			
		var Xpos = (screen.width-410)/2 ;	
		var Ypos = (screen.height-308)/2 ;	
		documentWindow = window.open('getactivationcode.asp?action=init&id='+document.frmSetSession.cboClientSession.value,'Activate','toolbar=no,location=no,status=no,scrollbars=no,width=410,height=308,screenX="+Xpos+",screenY='+Ypos+',Left='+Xpos+',Top='+Ypos)
	}	
