function CheckURL() {
//this.baseURL = parent.parent.frames["main"].location.href;
this.baseURL = document.location.href;
if (this.baseURL.indexOf('/malay/')) {
this.GATE='/malay/';
this.LangS="malay";
}
else {
this.GATE='/english/';
this.LangS="english";
}
this.first_split = this.baseURL.split(this.GATE);
this.baseLink1=this.first_split[0];
this.baseLink2=this.first_split[1];
this.baseLink=this.first_split[0]+this.GATE;
this.cURL=(this.baseLink1 || this.baseLink2);
return this;
}


//Asia Access pop-up window
function checkBrowser() {
	this.bname=navigator.appName;
	this.ver=navigator.appVersion; 
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?1:0;
	this.parsedVer = parseInt(this.ver);
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.opera5=this.agent.indexOf("Opera 5")>-1;
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ns3=(this.bname=="Netscape" && this.parsedVer <= 3)?1:0;
	this.others=(this.opera5);
	this.nw=(this.opera5 || this.ie6 || this.ie5 || this.ie4 || this.ns3 || this.ns4 || this.ns6 || this.others);
	return this;

}

//General pop-up window
function openWin(TheLink) {
window.open(TheLink,"General","width=750,height=500,menubar=no,scrollbars=yes,resizable=yes,top=0,left=0");
}

function openWinpop(TheLink) {
window.open(TheLink,"General","width=600,height=550,menubar=no,scrollbars=yes,resizable=yes,top=0,left=0");
}

function small(TheLink) {
		window.open(TheLink,"CTD","width=200,height=400,menubar=no,scrollbars=yes,resizable=no,top=200,left=100");
}

function table(TheLink) {
		window.open(TheLink,"CTD","width=250,height=450,menubar=no,scrollbars=yes,resizable=no,top=200,left=100");
}

function highlight(TheLink) {
		window.open(TheLink,"CTD","width=450,height=300,menubar=no,scrollbars=yes,resizable=no,top=250,left=150");
}

