<!-- dreamweaver scripts
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function runModify(obj1, obj2, obj3, obj4, obj5, obj6, obj7)
{
	document.myForm.lid.value = obj1;
	document.myForm.sidd1.value = obj2;
	document.myForm.cpid.value = obj3;
	document.myForm.cspid.value = obj4;
	document.myForm.cidd1.value = obj5;
	document.myForm.act.value = obj6;
	document.myForm.action = obj7;
	document.myForm.submit();

	return true;
}

//written by Muliati to only highlight when clicked and dehighlight when unselected.
function tukarbalik_pacnet(){
	  		
	if(document.images.pacnetsearch.src="/articles/images/082004/attachments/IMAGEUpaiFR.gif"){
		MM_swapImage('allwebsearch','','/articles/images/082004/attachments/IMAGE_UaqFR.gif',1);
	}			
	MM_swapImage('pacnetsearch','','/articles/images/082004/attachments/IMAGEUpaiFR.gif',1);
}

//written by Muliati to only highlight when clicked and dehighlight when unselected.
function tukarbalik_allweb(){

	if(document.images.allwebsearch.src="/articles/images/082004/attachments/IMAGE50ayFR.gif"){
		MM_swapImage('pacnetsearch','','/articles/images/082004/attachments/IMAGElVaqFR.gif',1);
	}
	MM_swapImage('allwebsearch','','/articles/images/082004/attachments/IMAGE50ayFR.gif',1);
}	  

//same functions but path changed for Jonathan's template
//written by Muliati to only highlight when clicked and dehighlight when unselected.
function tukarbalik_pacnet_full(){
	  		
	if(document.images.pacnetsearch.src="http://www.pacific.net.sg/articles/images/082004/attachments/IMAGEUpaiFR.gif"){
		MM_swapImage('allwebsearch','','http://www.pacific.net.sg/articles/images/082004/attachments/IMAGE_UaqFR.gif',1);
	}			
	MM_swapImage('pacnetsearch','','http://www.pacific.net.sg/articles/images/082004/attachments/IMAGEUpaiFR.gif',1);
}

//written by Muliati to only highlight when clicked and dehighlight when unselected.
function tukarbalik_allweb_full(){

	if(document.images.allwebsearch.src="http://www.pacific.net.sg/articles/images/082004/attachments/IMAGE50ayFR.gif"){
		MM_swapImage('pacnetsearch','','http://www.pacific.net.sg/articles/images/082004/attachments/IMAGElVaqFR.gif',1);
	}
	MM_swapImage('allwebsearch','','http://www.pacific.net.sg/articles/images/082004/attachments/IMAGE50ayFR.gif',1);
}

/*function validateSearchInput(){
	if(!document.search_form.q.value){
		alert('Search entry is empty!');
		return false;
	}
}*/


/* Online Feedback Form Validation. 
   Written by Muliati, Senior Webmaster.
   Last Updated Nov 23, 2004 */
function ValidateCSForm()
{

	if (!document.csform.name.value){
		alert('Please enter your name.');
		document.csform.name.focus();
		return false;
	}
	
	/*if (!document.csform.nric.value){
		alert('Please enter your NRIC.');
		document.csform.nric.focus();
		return false;
	}
	
	if(!document.csform.day.options[document.csform.day.selectedIndex].value){
		alert('Please enter Day of birth');
		document.csform.day.focus();
		return false;
	}
	
	if(!document.csform.month.options[document.csform.month.selectedIndex].value){
		alert('Please enter Month of birth');
		document.csform.month.focus();
		return false;
	}
	
	if(!document.csform.year.value){
		alert('Please enter Year of birth');
		document.csform.year.focus();
		return false;
	}
	else {
		if(!parseInt(document.csform.year.value)){
			alert('Please enter a valid year in 4-digit format, ie 1975');
			document.csform.year.focus();
			return false;		
		}
	}
	*/

	if (!document.csform.email.value){
		alert('Please enter your PacNet email address.\nIf you\'re a non-subscriber, please indicate your\nalternative email address for us to contact you.');
		document.csform.email.focus();
		return false;
	}

	var csf=document.csform;
	if (!csf.contactmobile.value && !csf.contacthome.value && !csf.contactoffice.value){
		alert('Please enter at least one contact number.');
		csf.contactmobile.focus();
		return false;
	}
	/*if(isNaN(csf.contactmobile.value)){
		alert('Please enter a valid contact number.');
		csf.contactmobile.focus();
		return false;
	}
	if(isNaN(csf.contacthome.value)){
		alert('Please enter a valid contact number.');
		csf.contacthome.focus();
		return false;
	}
	if(isNaN(csf.contactoffice.value)){
		alert('Please enter a valid contact number.');
		csf.contactoffice.focus();
		return false;
	}*/		
	
	//modification 090502 radiobuttons for feedbacktype
	var fd=document.csform.feedbacktype;
	var fdCond=true;

	for(f=0;f<fd.length;f++){
		if(fd[f].checked){
			fdCond=true;
			break;
		}
		else{
			fdCond=false;
		}
	}
	if(!fdCond){
		alert('Please select your feedback type.');
		fd[0].focus();
		return false;
	} 
		//validate product
	var prod=document.csform.product;
	var prodCond=true;

	for(p=0;p<prod.length;p++){
		if(prod[p].checked){
			prodCond=true;
			break;
		}
		else{
			prodCond=false;
		}
	}
	if(!prodCond){
		alert('Please select the service of your concern.');
		prod[0].focus();
		return false;
	}
	
	if (!document.csform.enquiry.value){
		alert('Please describe your enquiry/feedback.  Enter NONE if there isn\'t any.');
		document.csform.enquiry.focus();
		return false;
	}

	var t1=document.csform.modemmodel.value;
	var t2=document.csform.modemtype.options[document.csform.modemtype.selectedIndex].value;
	var t3=document.csform.hwproblem.options[document.csform.hwproblem.selectedIndex].value;
	var t4=document.csform.os.options[document.csform.hwproblem.selectedIndex].value;
	var t5=document.csform.errormsg.value;

	if (document.csform.feedbacktype[3].checked){
		if (!t1 || !t2 || !t3 || !t4 || !t5){
			alert("You've selected \"Technical Issues\".\nPlease specify Hardware and Software information.");
			document.csform.modemmodel.focus();
			return false;
		}
	}


}

/* Used in Online Feedback form to make Technical fields appear
   Written by Muliati, Senior Webmaster
   Last modified: Nov 22, 2004 */
function enableTECH(){
	var ft=document.csform.feedbacktype;

	document.all.tech.style.visibility = 'visible';
}

function disableTECH(){
	document.all.tech.style.visibility = 'hidden';
}
//-->

//tooltip script function lifted from dreamweaver
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 0;
offsetY = 20;
var toolTipSTYLE="";
function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#777777";
    if(!bg) bg = "#FFFFFF";
    var content =
	'<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="center"><font face="sans-serif" color="' + fg +
    '" size="-2">&'+'nbsp;' + msg +
    '&'+'nbsp;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }
  toolTipSTYLE.left = x + offsetX;
  toolTipSTYLE.top = y + offsetY;
  return true;
} 