// JScript source code

// Variables
var strTitle = "Uniworld Logistics    (Global Reach Local Touch...) ";
SetTitle();

var aCountry = new Array();
aCountry[0] = "India";
aCountry[1] = "China";
aCountry[2] = "Hong Kong";
aCountry[3] = "Malaysia";
aCountry[4] = "Taiwan";
aCountry[5] = "Singapore";
aCountry[6] = "Vietnam";
aCountry[7] = "Thailand";

var aProfile = new Array();
aProfile[0] = "uc.htm";
aProfile[1] = "china/china-profiles.htm";
aProfile[2] = "hongkong/hongkong-profiles.htm";
aProfile[3] = "malaysia/malaysia-profiles.htm";
aProfile[4] = "taiwan/taiwan-profiles.htm";
aProfile[5] = "singapore/singapore-profiles.htm";
aProfile[6] = "vietnam/vietnam-profiles.htm";
aProfile[7] = "thailand/thailand-profiles.htm";

var aContact = new Array();
aContact[0] = "uc.htm";
aContact[1] = "china/china-contact.htm";
aContact[2] = "hongkong/hongkong-contact.htm";
aContact[3] = "malaysia/malaysia-contact.htm";
aContact[4] = "taiwan/taiwan-contact.htm";
aContact[5] = "singapore/singapore-contact.htm";
aContact[6] = "vietnam/vietnam-contact.htm";
aContact[7] = "thailand/thailand-contact.htm";

var aCareers = new Array();
aCareers[0] = "uc.htm";
aCareers[1] = "china/china-careers.htm";
aCareers[2] = "hongkong/hongkong-careers.htm";
aCareers[3] = "malaysia/malaysia-careers.htm";
aCareers[4] = "taiwan/taiwan-careers.htm";
aCareers[5] = "singapore/singapore-careers.htm";
aCareers[6] = "vietnam/vietnam-careers.htm";
aCareers[7] = "thailand/thailand-careers.htm";

var aIntro = new Array();
aIntro[0] = "india/india-intro.htm";
aIntro[1] = "china/china-intro.htm";
aIntro[2] = "hongkong/hongkong-intro.htm";
aIntro[3] = "malaysia/malaysia-intro.htm";
aIntro[4] = "taiwan/taiwan-intro.htm";
aIntro[5] = "singapore/singapore-intro.htm";
aIntro[6] = "vietnam/vietnam-intro.htm";
aIntro[7] = "thailand/thailand-intro.htm";

// Functions

function SetTitle()
{
	window.document.title = strTitle;
}


function logout()
{
	parent.document.location = 'Logout.aspx';
}


function CheckSize(idForSize)
{
	var forSize = document.getElementById(idForSize)
	if ( forSize )
	{
		alert( "Left : " + forSize.offsetLeft );
		alert( "Top : " + forSize.offsetTop );
		alert( "Width : " + forSize.offsetWidth );
		alert( "Height : " + forSize.offsetHeight );
	}
}

		
function getCookie(strCookieName)
{
	if (document.cookie.length > 0)
	{ 
		var nStart = new Number();
		var nEnd = new Number();
		nStart = document.cookie.indexOf(strCookieName + "=");
		if (nStart != -1)
		{ 
			nStart = nStart + strCookieName.length+1 ;
			nEnd = document.cookie.indexOf(";",nStart);
			if (nEnd == -1)
			{
				nEnd = document.cookie.length;
			}
			return unescape(document.cookie.substring(nStart,nEnd));
		} 
	}
	return ""
}


function setCookie(strCookieName,strCookieValue)
{
	if ( strCookieValue )
	{
		document.cookie = strCookieName + "=" + escape(strCookieValue);
	}
	else
	{
		var dtExDate = new Date();
		dtExDate.setMinutes(-5);
		strCookieName = strCookieName + "= ; expires=" + dtExDate.toGMTString();
		document.cookie = strCookieName
	}
}


function CheckUser()
{
	var strUserRoll = getCookie("UserRoll");
	if (strUserRoll != "A" )
	{
		parent.document.location = "Default.aspx";
	}
}


// ****************************************************************************************************************************** //

function SetHeight()
{
	parent.document.getElementById("area").style.height = ( document.getElementById("toBeSetArea").offsetHeight < 422 ) ? 422 : document.getElementById("toBeSetArea").offsetHeight;
}


function KeyContactsAddress(strCountry, strFlag)
{
	var strHref = new String();
	strHref = self.location.href;
	strHref = strHref.substr(0,(strHref.length - 15));
	strHref += "networks/address.aspx?nw=0&country=" + strCountry + "&flag=" + strFlag + "&offices=";
	var NewPopup = window.open(strHref,'NewPopup','height=425,width=551,scrollbars=no');
}

