function Pop_Calender(formName,fieldName)
{
	var url = "/peacebook/common/Calender.htm";
	var iheight = 250;
	var iwidth = 320;
	var Pop_Date=window.showModalDialog(url,"","center:yes;dialogHeight:"+iheight+"px;dialogwidth:"+iwidth+"px;status:no;resizable:no;help:no");

	if (typeof(Pop_Date) != "undefined")
	{
		var objfield = eval("document."+formName+"."+fieldName)
		objfield.value = Pop_Date;
	}
}

function openUrl_NoModal(htmlurl,strTitle,itop,ileft,iheight,iwidth) 
{ 
	//if(strTitle=="") strTitle="COSCOShipping";
	if(itop==0) itop=100;
	if(ileft==0) ileft=200;
	if(iheight==0) iheight=560;
	if(iwidth==0) iwidth=700;
	window.open(htmlurl,strTitle,"width="+iwidth+",height="+iheight+",top="+itop+",left="+ileft+",staTEUs=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no");
	return false;
}

function openUrl_Modal(htmlurl,strTitle,itop,ileft,iheight,iwidth) 
{ 
	//if(strTitle=="") strTitle="COSCOShipping";
	if(itop==0) itop=100;
	if(ileft==0) ileft=200;
	if(iheight==0) iheight=560;
	if(iwidth==0) iwidth=700;

	var returnValue=window.showModalDialog(htmlurl,strTitle,"center:yes;dialogHeight:"+iheight+"px;dialogwidth:"+iwidth+"px;status:no;resizable:no;help:no");

	return false;
	//showModalDialog
}

function openurl(htmlurl) 
	{ 
	window.open(htmlurl,"PEACEBOOK","width=700,height=560,top=100,left=200,staTEUs=no,toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no");
	return false;
	//showModalDialog
	}


function SetCookie (second,third) 
{
	var expDays = 30;
	var exp = new Date(); 
	exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	document.cookie = "Second=" + escape (second) + ";expires=" + exp.toGMTString();
	document.cookie = "Third=" + escape (third); + ";expires=" + exp.toGMTString();
}

function GetCookie (name) 
{
	var arg = name + "=";  
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
	{
	var j = i + alen;
	if (document.cookie.substring(i, j) == arg)
	return getCookieVal (j);
	}
}

function getCookieVal (offset) 
{
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
	endstr = document.cookie.length;  
	return unescape(document.cookie.substring(offset, endstr));
}
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_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_findObj(n, d) { //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function display_div(divname)
{

	parent.Second_Menu.Layer1.className="layer-hide";
	parent.Second_Menu.Layer2.className="layer-hide";
	parent.Second_Menu.Layer3.className="layer-hide";
	parent.Second_Menu.Layer4.className="layer-hide";
	parent.Second_Menu.Layer5.className="layer-hide";
	parent.Second_Menu.Layer6.className="layer-hide";
	parent.Second_Menu.Layer7.className="layer-hide";
	parent.Second_Menu.Layer8.className="layer-hide";

	parent.Third_Menu.Layer1_1.className="layer-hide";
	parent.Third_Menu.Layer1_2.className="layer-hide";
	parent.Third_Menu.Layer1_3.className="layer-hide";

	parent.Third_Menu.Layer2_2.className="layer-hide";
	parent.Third_Menu.Layer2_3.className="layer-hide";


//	parent.Third_Menu.Layer2_2.className="layer-hide";
//	parent.Third_Menu.Layer2_3.className="layer-hide";

//	parent.Third_Menu.Layer6_1.className="layer-hide";

//alert(divname)
	switch (divname)
	{
	   case "Layer1":
			parent.Second_Menu.Layer1.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
//			parent.Third_Menu.Layer1_1.className="layer-show";
			break;
	   case "Layer2":
			parent.Second_Menu.Layer2.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
			break;
	   case "Layer3":
			parent.Second_Menu.Layer3.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
			break;
	   case "Layer4":
			parent.Second_Menu.Layer4.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
			break;
	   case "Layer5":
			parent.Second_Menu.Layer8.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
			break;
	   case "Layer6":
			parent.Second_Menu.Layer6.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
//			parent.Third_Menu.Layer6_1.className="layer-show";
			break;
	   case "Layer7":
			parent.Second_Menu.Layer8.className="layer-show";
			parent.Third_Menu.Layer0.className="layer-show";
			break;
	}
}

