function j_OpenPage(sPageName)
{
	if(sPageName == "Home")
		parent.location = "Default.aspx";
	else if(sPageName == "AboutUs")
		parent.location = "AboutUs.aspx";
	else if(sPageName == "Services")
		parent.location = "ITOutsourcing.aspx";
	else if(sPageName == "ClientAccess")
		parent.location = "ClientAccess.aspx";
	else if(sPageName == "ContactUs")
		parent.location = "ContactUs_HK.aspx";
	
}

function j_OpenService(sPageName)
{
	if(sPageName == "ITOutsourcing")
		parent.location = "ITOutsourcing.aspx";
	else if(sPageName == "ITConsultancy")
		parent.location = "ITConsultancy.aspx";
	else if(sPageName == "Startup")
		parent.location = "Startup.aspx";
	else if(sPageName == "Cabling")
		parent.location = "Cabling.aspx";
	else if(sPageName == "Network")
		parent.location = "Network.aspx";
	else if(sPageName == "VoIP")
		parent.location = "VoIP.aspx";
	else if(sPageName == "Software")
		parent.location = "Software.aspx";
}

function j_OpenContactUs(sPageName)
{
	if(sPageName == "HK")
		parent.location = "ContactUs_HK.aspx";
	else if(sPageName == "PH")
		parent.location = "ContactUs_PH.aspx";
}

function j_CheckWidth()
{
	var nAddLen = 50;
	var nCharSize = 9;
	var nTableCols = 5;
	var nTableWidth = 658;
	var nHomeLen = document.forms[0].all["q_lblHome"].innerText.length;
	var nAboutUsLen = document.forms[0].all["q_lblAboutUs"].innerText.length;
	var nServicesLen = document.forms[0].all["q_lblServices"].innerText.length;
	var nClientAccessLen = document.forms[0].all["q_lblClientAccess"].innerText.length;
	var nContactUsLen = document.forms[0].all["q_lblContactUs"].innerText.length;
	var nSumLen = nHomeLen + nServicesLen + nClientAccessLen + nAboutUsLen + nContactUsLen;
	
	var nLen = nSumLen/nTableCols;
	var nTotalHomeLen = (nHomeLen * nCharSize) + nAddLen;
	document.forms[0].all["tdItem0"].width = nTotalHomeLen;
	
	var nTotalAboutUsLen = (nAboutUsLen * nCharSize) + nAddLen;
	document.forms[0].all["tdItem1"].width = nTotalAboutUsLen
	
	var nTotalServicesLen = ((nServicesLen-2) * nCharSize) + nAddLen;
	document.forms[0].all["tdItem2"].width = nTotalServicesLen;
	
	var nTotalClientLen = (nClientAccessLen * nCharSize) + nAddLen;
	document.forms[0].all["tdItem3"].width = nTotalClientLen;
	
	var nTotalContactUsLen = (nContactUsLen * nCharSize) + nAddLen;
	document.forms[0].all["tdItem4"].width = nTotalContactUsLen;
	
	var nTotalWidth = nTotalHomeLen + nTotalAboutUsLen + nTotalServicesLen + nTotalClientLen + nTotalContactUsLen;
	var nDifference = nTableWidth - nTotalWidth;
	document.forms[0].all["tdItem5"].width = nDifference;
}

function j_DownloadPDF(sPath)
{
	alert("Download PDF");
}

function j_SaveAsPDF(sPath)
{
	alert("Download " +sPath);
	var sProps = "width=20, height=420";
	var myTempWindow = window.open("PDF/VoIP.pdf","", "");
	myTempWindow.document.execCommand("SaveAs");
    //myTempWindow.document.execCommand(’SaveAs’,’null’,"\\PDF\\VoIP.pdf");
    myTempWindow.close();
}