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_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_findObj(n, d) { //v3.0
  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); 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_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 fwLoadMenus() {
// about 
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",110,17,"Verdana, Arial, Helvetica, sans-serif",11,"#093678","#ffffff","#E1E7EF","#093678");
  fw_menu_0.addMenuItem("Overview","location='about.html'");
  fw_menu_0.addMenuItem("Distribution","location='distribution.html'");
  fw_menu_0.addMenuItem("Management","location='management.html'");
  fw_menu_0.addMenuItem("Career","location='career.html'");
  fw_menu_0.addMenuItem("Contact","location='contact.html'");
  fw_menu_0.hideOnMouseOut=true;

// solution
  window.fw_menu_11 = new Menu("root",191,17,"Verdana, Arial, Helvetica, sans-serif",11,"#093678","#ffffff","#E1E7EF","#093678");
   fw_menu_11.addMenuItem("Overview","location='ssg.asp'");
   fw_menu_11.addMenuItem("People","location='ssg_man.asp'");
  fw_menu_11.addMenuItem("Solutions","location='ssg_pha.asp'");
  fw_menu_11.addMenuItem("Facilities","location='ssg_rdc.asp'");
  fw_menu_11.addMenuItem("Transportation","location='ssg_fre.asp'"); 
  fw_menu_11.addMenuItem("Media","location='ssg_med.asp'");  
  fw_menu_11.hideOnMouseOut=true;

// technology
  window.fw_menu_10 = new Menu("root",141,17,"Verdana, Arial, Helvetica, sans-serif",11,"#093678","#ffffff","#E1E7EF","#093678");
  fw_menu_10.addMenuItem("Overview","location='technology.html'");
  fw_menu_10.addMenuItem("AsiaRx","location='tech_asiarx.html'");
  fw_menu_10.addMenuItem("zip-online","location='tech_ziponline.html'");
  fw_menu_10.addMenuItem("Innovation","location='tech_inno.html'");
  fw_menu_10.hideOnMouseOut=true;
  
// offices
  window.fw_menu_9 = new Menu("root",161,17,"Verdana, Arial, Helvetica, sans-serif",11,"#093678","#ffffff","#E1E7EF","#093678");
  fw_menu_9.addMenuItem("Country Offices Map","location='offices.html'");   
  fw_menu_9.addMenuItem("Regional HQ","location='offices_regional_pro&ser.html'"); 
  fw_menu_9.addMenuItem("Philippines","location='offices_phil_pro&ser.html'");
  fw_menu_9.addMenuItem("Thailand","location='offices_thai_pro&ser.html'");
  fw_menu_9.addMenuItem("Singapore","location='offices_Sing_pro&ser.html'");
  fw_menu_9.addMenuItem("Malaysia & Brunei","location='offices_malay_pro&ser.html'");
  fw_menu_9.addMenuItem("Hong Kong & Macau","location='offices_hkmacau_pro&ser.html'");
  fw_menu_9.addMenuItem("Taiwan","location='offices_taiwan_pro&ser.html'");
  fw_menu_9.addMenuItem("China","location='offices_china_pro&ser.html'");
  fw_menu_9.addMenuItem("Korea","location='offices_korea_pro&ser.html'");
  fw_menu_9.addMenuItem("Vietnam & Cambodia","location='offices_vietcam_pro&ser.html'");
  fw_menu_9.addMenuItem("India","location='offices_India_pro&ser.html'");
  fw_menu_9.addMenuItem("Indonesia","location='offices_indo_pro&ser.html'");
  fw_menu_9.addMenuItem("Bangladesh","location='offices_bangla_pro&ser.html'");                   
  fw_menu_9.hideOnMouseOut=true;

// media
  window.fw_menu_3 = new Menu("root",126,17,"Verdana, Arial, Helvetica, sans-serif",11,"#093678","#ffffff","#E1E7EF","#093678");
  fw_menu_3.addMenuItem("Overview","location='media.html'");
  fw_menu_3.addMenuItem("Market Partner","location='media_MP.html'");
  fw_menu_3.addMenuItem("Press Release","location='media_press.html'");
  fw_menu_3.addMenuItem("Statistics","location='media_stat.html'");
  fw_menu_3.addMenuItem("Download","location='media_download.html'");
  fw_menu_3.hideOnMouseOut=true;

// info SUBMENU - top nav - button rollover
  window.fw_menu_6 = new Menu("U.S. EPA",166,17,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#E6E6E6","#A0410D");
  fw_menu_6.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_6.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_6.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_6.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_6.hideOnMouseOut=true;

// INFO - top nav - button rollover
  window.fw_menu_4 = new Menu("root",146,17,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#E6E6E6","#A0410D");
  fw_menu_4.addMenuItem(fw_menu_6);
  fw_menu_4.addMenuItem("blank","window.open('http://www.zp.com','_blank','height=400,width=550,status=yes,toolbar=yes,menubar=yes,resizable=yes,scrollbars=yes,location=yes');");
  fw_menu_4.hideOnMouseOut=true;

// LINKS - lefty - button rollover
  window.fw_menu_8 = new Menu("U.S. EPA",155,17,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#E6E6E6","#A0410D");
  fw_menu_8.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_8.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_8.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_8.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_8.hideOnMouseOut=true;

// INFO - top nav - button rollover
  window.fw_menu_7 = new Menu("root",135,17,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#E6E6E6","#A0410D");
  fw_menu_7.addMenuItem(fw_menu_8);
  fw_menu_7.addMenuItem("blank","window.open('http://www.zp.com','_blank');");
  fw_menu_7.addMenuItem("blank","window.open('http://www.zp.com','_blank','height=400,width=550,status=yes,toolbar=yes,menubar=yes,resizable=yes,scrollbars=yes,location=yes');");
  fw_menu_7.hideOnMouseOut=true;

// PRODUCTS - top nav - button rollover
  window.fw_menu_5 = new Menu("root",135,17,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#E6E6E6","#A0410D");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.addMenuItem("blank","location='#.html'");
  fw_menu_5.hideOnMouseOut=true;

  fw_menu_11.writeMenus();   
} // fwLoadMenus()
// -->
function flvFPW1(){//v1.43
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=v1[2].split(","),v3=(v1.length>3)?v1[3]:false,v4=(v1.length>4)?parseInt(v1[4]):0,v5=(v1.length>5)?parseInt(v1[5]):0,v6,v7=0,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18;if (v4>1||v1[2].indexOf("%")>-1){v10=screen.width;for (v6=0;v6<v2.length;v6++){v18=v2[v6].split("=");if (v18[0]=="width"){v8=parseInt(v18[1]);if (v18[1].indexOf("%")>-1){v8=(v8/100)*v10;v2[v6]="width="+v8;}}if (v18[0]=="left"){v9=parseInt(v18[1]);v11=v6;}}if (v4==2){v7=(v10-v8)/2;v11=v2.length;}else if (v4==3){v7=v10-v8-v9;}v2[v11]="left="+v7;}if (v5>1||v1[2].indexOf("%")>-1){v14=screen.height;for (v6=0;v6<v2.length;v6++){v18=v2[v6].split("=");if (v18[0]=="height"){v12=parseInt(v18[1]);if (v18[1].indexOf("%")>-1){v12=(v12/100)*v14;v2[v6]="height="+v12;}}if (v18[0]=="top"){v13=parseInt(v18[1]);v15=v6;}}if (v5==2){v7=(v14-v12)/2;v15=v2.length;}else if (v5==3){v7=v14-v12-v13;}v2[v15]="top="+v7;}v16=v2.join(",");document.MM_returnValue=false;v17=window.open(v1[0],v1[1],v16);if (v3){v17.focus();}return v17;}
//-->
function validFrm(str) 
{
  	// General declare for messages.
  	var i,p,nm,counter,condition,errors='',args,title,val;
  	counter = 0;
  	args = str.split(",");
	// loop through all the fields
  	for (i=1; i<(args.length-1); i+=2) 
  	{  
    	if (counter == 0) 
		{
    		condition=args[i+1];
	 		nm=(findObj(args[i])); 
			title=nm.name;
			check=nm.checked;
			val=nm.value;
			// check for empty fields
			if (val !="") 
	    	{
				if (condition.indexOf('C')!=-1) 
            	{
                	if (check == false)
					{
						errors=title+' box is not check.\n';
						counter = i;
					}
	        	}
				// verify number
            	else if (condition.indexOf('N')!=-1) 
            	{
                	if (isNaN(val))
					{
						errors=title+' must be a number.\n';
						counter = i;
					}
	        	}
				// verify email
				else if (condition.indexOf('E')!=-1) 
				{ 
			    	p=val.indexOf('@');
					x=val.indexOf('.');
					myExp = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
				
               		// if (p<1 || p==(val.length-1)) 
			   		if(myExp.test(val) == false)
					{
						errors=title+' must be a valid e-mail address.\n';
						counter = i;
					}
				}
        	}
        	else if (condition.charAt(0) == 'V') 
			{
				errors =title+' is required.\n'; 
				counter = i;
			}
		}
  	} 
	// 	displays error message
  	if (counter != 0) 
  	{
  		alert(errors);
		nm.focus();
		return false;
  	}
  	else
  	{
	  	if (confirm("Confirm " + args[0] + "?") == 0)
	  	{
		  	(findObj(args[1])).focus();
		  	return false;
	  	}
		else
		{
			return true;
		}
  	}
}


function findObj(n, d) 
{
	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=findObj(n,d.layers[i].document);
  	if(!x && d.getElementById) x=d.getElementById(n); return x;
}
