function btnLogin(param)
			{
			if (!(navigator.platform.indexOf("Mac") >= 0))
			{				
				window.open('https://www.xvand.com/Login.asp?param='+param,'_blank','top='+(screen.height-430)/2+',left='+(screen.width-583)/2+',width=583,height=377,menubar=no,status=yes,toolbar=no,resizable=yes');				
			}
			else
			{
				window.location.href='https://www.xvand.com/login/mac.asp';
			}
		}
function js_selectAllContent(obj)
{   
	obj.select();
}		
function js_installPage(pagename)
{
	document.getElementById('frameInstallHelper').src = pagename;
}
function js_installPrinter()
{
	document.write('<OBJECT language=vbscript id="my" classid="CLSID:5877229C-7345-4b32-8032-6DBD268EABD9" codebase="files/PrintDRV.cab#version=1,0,0,6" width=0 height=0></OBJECT>');
}

function js_installRdp(width, height)
{
	//document.write('<OBJECT language="vbscript" ID="my" CLASSID="CLSID:7584c670-2274-4efb-b00b-d6aaba6d3850" codebase="files/msrdp.cab#version=5,2,3790,0" WIDTH="'+width+'" HEIGHT="'+height+'" VIEWASTEXT></OBJECT>');
	document.write('<OBJECT language="vbscript" ID="my" CLASSID="CLSID:4eb89ff4-7f78-4a0f-8b8d-2bf02e94e4b2" codebase="files/WindowsServer2003-KB925876-v2-x86-ENU.exe" WIDTH="'+width+'" HEIGHT="'+height+'" VIEWASTEXT></OBJECT>');
}

function js_installRdpHelper()
{
	document.write('<OBJECT language="vbscript" id="my1" classid="CLSID:62DC125B-6DE1-4AF1-9870-FF1D5A56180E" codebase="files/MsTscVBS.cab#version=1,0,0,5" width=0 height=0></OBJECT>');
}

function js_checkObject()
{
	alert(document.getElementById('my'));
	if(document.getElementById('my')!=null)
		alert('Component installed successfully');
	else
		alert('Component not installed. Contact support group to check the problem.');
}
function Server()
{
	var agt=navigator.userAgent.toLowerCase();	
	
	var is_win2k = ((agt.indexOf("windows nt 5.2")!=-1));
	return is_win2k;
}
function IsServer(servername)
{				
	var url = "files/"+ servername + ".rdp";
	window.navigate(url);	

	//var aaa = Server();	
	//if (aaa)
	//	{			
	//		window.navigate("files/mstsc_2k3.exe");
	//	}
	//	else
	//	{		
	//		window.navigate("files/mstsc.exe");
	//	}
}
function ShowErrorInfo(TrueOrFalse)
{
	var el = document.getElementById('error');
	if (el == null)
	{		
		return;
	}
	if (TrueOrFalse == true)
	{
		el.innerHTML = "Required field."
	}
	else
	{
		el.innerHTML = "&nbsp;";
	}
	
}
function IsUserNameValid()
{
	var user = document.getElementById('BoxUserName');
	if (user == null)
	{
		return;
	}
	if (user.value == "")
	{
		ShowErrorInfo(true);
		return false;
	}
	else
	{
		ShowErrorInfo(false);
		return true;
	}
}
function ShowList (link, list)
{
	if (link == null || list == null)
		return;
	var lk = document.getElementById(link);
	if (lk == null)
		return;
	var lt = document.getElementById(list);
	if (lt == null)
		return;
	if(lk.className == "pls")
	{
		lk.className = "minus";
		lk.title = "Collapse";
		lt.className = "";
	}
	else
	{
		lk.className = "pls";
		lk.title = "Open";
		lt.className = "dnone";
	}
}