function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}

//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");


function showPopupText(){
var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
	if(o.dypop!=sPop) {
			sPop=o.dypop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				dypopLayer.innerHTML="";
				dypopLayer.style.filter="Alpha()";
				dypopLayer.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
			
	}
}

function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
document.onmouseover=showPopupText;

function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }

//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -2;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
}
}

function ShowMenu(vMnuCode,tWidth) {
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar;
	t = vSrc.offsetTop + topMar + h + space;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}

function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}
//用户控制面板
var manage= '<table cellSpacing=4 cellPadding=4 width=190><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"haishun_1.asp\">公司概况</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"haishun_2.asp\">主营业务介绍</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"haishun_3.asp\">联系方法</a></td></tr></table>'
var manage1= '<table cellSpacing=4 cellPadding=4 width=180><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"leimao_1.asp\">公司概况</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"leimao_2.asp\">主营业务介绍</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"leimao_3.asp\">联系方法</a></td></tr></table>'
var manage2= '<table cellSpacing=4 cellPadding=4 width=195><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"waidai_1.asp\">公司概况</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"waidai_2.asp\">国际货运五部（外代五部）</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"leimao_2.asp\">国内货运部</a></td></tr></table>'
//模板列表
//var stylelist = '<a class=top2 style=font-size:9pt;line-height:12pt; href=\"zici.asp\">总经理致词</a><br><a class=top2 style=font-size:9pt;line-height:12pt; href=\"jianjie.asp\">企业概况</a><br><a class=top2 style=font-size:9pt;line-height:12pt; href=\"chengnuo.asp\">理货承诺</a><br><a class=top2 style=font-size:9pt;line-height:12pt; href=\"jigou.asp\">部门机构图</a><br><a class=top2 style=font-size:9pt;line-height:14pt; href=\"table.asp\" onclick=\"return new_win(this.href);\" target=_blank>理货船舶动态一栏表</a>'
var stylelist = '<table cellSpacing=4 cellPadding=4 width=160><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=3\">COMPANY PROFILE</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=40\">HISTORY</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=118\">MISSION</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=119\">VISION</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=120\">MANAGEMENT</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"pines.asp\">PINES THE MARKET PLACE</a></td></tr></table>'
//论坛状态
 var boardstat= '<table cellSpacing=4 cellPadding=4 width=110><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=22\">Meat/Seafood</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=19\">Cheese/Deli</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=72\">Wine</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=71\">Fruit/Vegetable/Herb</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=124\">Groceries/Others</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:12pt; href=\"sample.asp?id=125\">Non-Food</a></td></tr></table>'
//论坛收藏
var downlist= '<table cellSpacing=4 cellPadding=4 width=80><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"office.asp\">办公室</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"yewu.asp\">业务部</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"zhiguan.asp\">质管部</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"longwan.asp\">龙湾办事处</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"qili.asp\">七里办事处</a></td></tr><tr><td onmouseover=\"this.className=\'cell_over1\';\" onmouseout=\"this.className=\'cell_out1\';\"><a class=top2 style=font-size:9pt;line-height:14pt; href=\"huodui.asp\">理货队</a></td></tr></table>'