﻿// JScript File

  

function CopyInBoard(hahaUrl) 
{ 			
	window.clipboardData.setData('text',hahaUrl)
	 alert("复制成功，请粘贴到QQ/MSN上推荐给你的好友！");	
}


var oPopup = window.createPopup();

var popTop=50;

function popmsg(msgstr){

//var winstr="<html><head>  <meta http-equiv=\"content-type\" content=\"text/html;\" charset=\"gb2312\">";
//winstr+="<title>久久公告</title></head>";
//winstr+="<style type='text/css'>td,div,span {font-size:12px;}</style>";
//winstr+="</head><body topmargin=\"0\" marginheight=\"0\" leftmargin=\"0\" marginwidth=\"0\">";
    
winstr="<table style=\"border: 1 solid  #6D93C8\"  width=\"200\" height=\"300\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"   >";

winstr+="<tr><td align=\"center\"><table width=\"95%\" height=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";

winstr+="<tr><td height=\"25\" align=\"center\" style=\"font-size:12px; font-weight:bold;color: #FF3300;\">本站公告</td></tr><tr><td valign=\"top\" style=\"font-size:12px; color: #FF3300; face: Tahoma\">"+msgstr+"</td></tr></table></td></tr></table>";

//winstr+="</body></html>";


oPopup.document.body.innerHTML = winstr;

popshow();

}

function popshow(){

//window.status=popTop;

if(popTop>10800){

clearTimeout(mytime);

oPopup.hide();

return;

}else if(popTop>10600&&popTop<10800){

oPopup.show(screen.width-218,screen.height,200,10800-popTop);

}else if(popTop>10580&&popTop<10600){

oPopup.show(screen.width-218,screen.height+(popTop-10800),200,300);

}else if(popTop<300){

oPopup.show(screen.width-218,screen.height,200,popTop);

}else if(popTop<340){

oPopup.show(screen.width-218,screen.height-popTop,200,300);

}

popTop+=10;

var mytime=setTimeout("popshow();",50);

}

function sAlert(str){
			var msgw,msgh,bordercolor;
			msgw=400;//提示窗口的宽度
			msgh=100;//提示窗口的高度
			titleheight=25 //提示窗口标题高度
			bordercolor="#336699";//提示窗口的边框颜色
			titlecolor="#99CCFF";//提示窗口的标题颜色
			
			var sWidth,sHeight;
			sWidth=document.body.offsetWidth;
			sHeight=document.body.offsetHeight;
			if (sHeight<screen.height)
			{
				sHeight=screen.height;
			}

			var bgObj=document.createElement("div");
			bgObj.setAttribute('id','bgDiv');
			bgObj.style.position="absolute";
			bgObj.style.top="0";
			bgObj.style.background="#777";
			bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
			bgObj.style.opacity="0.6";
			bgObj.style.left="0";
			bgObj.style.width=sWidth + "px";
			bgObj.style.height=sHeight + "px";
			bgObj.style.zIndex = "1000000";
			document.body.appendChild(bgObj);
			
			var msgObj=document.createElement("div")
			msgObj.setAttribute("id","msgDiv");
			msgObj.setAttribute("align","center");
			msgObj.style.background="white";
			msgObj.style.border="1px solid " + bordercolor;
	    msgObj.style.position = "absolute";
      msgObj.style.left = "50%";
      msgObj.style.top = "50%";
      msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";
      msgObj.style.marginLeft = "-225px" ;
      msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
      msgObj.style.width = msgw + "px";
      msgObj.style.height =msgh + "px";
      msgObj.style.textAlign = "center";
      msgObj.style.lineHeight = (msgh-titleheight) + "px";
      msgObj.style.zIndex = "1000001";
   
		   var title=document.createElement("h4");
		   title.setAttribute("id","msgTitle");
		   title.setAttribute("align","right");
		   title.style.margin="0";
		   title.style.padding="3px";
		   title.style.background=bordercolor;
		   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);";
		   title.style.opacity="0.75";
		   title.style.border="1px solid " + bordercolor;
		   title.style.height="18px";
		   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";
		   title.style.color="white";
		   title.style.cursor="pointer";
		   title.innerHTML="";
		   title.onclick=function(){
		        return;
		        document.body.removeChild(bgObj);
                document.getElementById("msgDiv").removeChild(title);
                document.body.removeChild(msgObj);
                }
		   document.body.appendChild(msgObj);
		   document.getElementById("msgDiv").appendChild(title);
		   var txt=document.createElement("p");
		   txt.style.margin="1em 0"
		   txt.setAttribute("id","msgTxt");
		   txt.innerHTML=str;
           document.getElementById("msgDiv").appendChild(txt);
  }
            
            
    function WebForm_OnSubmit() {
    try{return ValidatorOnSubmit();}catch(e){}sAlert('数据处理中,请稍后................');
    return true;
    }
 


function menu_display(t_id,i_id){//显示隐藏程序
        var t_id;//表格ID
        var i_id;//图片ID
        var on_img="../images/fold_2.gif";//打开时图片
        var off_img="../images/fold_1.gif";//隐藏时图片
                if (t_id.style.display == "none") {//如果为隐藏状态
                t_id.style.display="";//切换为显示状态
                i_id.src=on_img;//换图
}
        else{//否则
                t_id.style.display="none";//切换为隐藏状态
                i_id.src=off_img;
                }//换图

}


function OrderView()
			{				
				window.open('OrderView.aspx' ,'_blank','width=600,height=600,toolbar=0,location=0,directories=0,resizable=1,status=0,menubar=1,scrollbars=0')
		
			}
			
			
				function MessageBox(MessageID)
			{				
				window.open('Message.aspx?MessageID='+ MessageID ,'_blank','width=500,height=600,toolbar=0,location=0,directories=0,resizable=1,status=0,menubar=0,scrollbars=1')
		
			}
			
			
function PrintBox(OrderID)
			{				
				window.open('PrintOrder.aspx?OrderID='+ OrderID ,'_blank','width=600,height=300,toolbar=0,location=0,directories=0,resizable=1,status=0,menubar=1,scrollbars=0')
		
			}


 function chk_img(img_temp)
    {
        var img_1=document.getElementById("img_1");
        var img_2=document.getElementById("img_2");

       
        img_1.src="images/tab_1_off.gif";
        img_2.src="images/tab_2_off.gif";
                    
        var plan_1=document.getElementById("plan_1");
        var plan_2=document.getElementById("plan_2");
       
         plan_1.style.display="none";
        plan_2.style.display="none";
     
        
        var img_this=document.getElementById(img_temp);
        
        if(img_temp=="img_1")
        {        
         img_this.src="images/tab_1_on.gif";
         plan_1.style.display="block";
         
        }
        else if(img_temp=="img_2")
        {
        
        img_this.src="images/tab_2_on.gif";
        plan_2.style.display="block";
        }
             
    }

function LinkWindow(){
window.open("linkApply.aspx","new","width=480,height=380,location=no,toolbar=no,directories=no,status=no,resizable=no,scrollbars=no,menubar=no");
}

 