/*程序员：常学征
   qq:455340190 306516915
   www.woxan.com
*/
    function sAlert(type,url){	
   
	var bai_bj = document.createElement("DIV");
    bai_bj.id = "bai_bj";
    bai_bj.style.position = "absolute";
    bai_bj.style.left = "0px";
    bai_bj.style.top =  "0px";
    bai_bj.style.width =  document.body.scrollWidth+"px";
    bai_bj.style.height = document.body.scrollHeight+"px";
    bai_bj.style.background = "#ffffff";
    bai_bj.style.textAlign = "center";
    bai_bj.style.zIndex = "10000";
    bai_bj.style.filter = "alpha(opacity=0)";
    bai_bj.style.opacity = 0.0;	
	
	////////////////////////////////////////////////
    var shield = document.createElement("DIV");
    shield.id = "shield";
    shield.style.position = "absolute";
    shield.style.left = "50%";//"0px";
    shield.style.top = "50%";//"0px";
	
	shield.style.marginLeft = "-310px" ;
    shield.style.marginTop = -195+document.documentElement.scrollTop+"px";
	
    shield.style.width = "620px"; 
    shield.style.height = "390px";
    shield.style.background = "#000000";
    shield.style.textAlign = "center";
    shield.style.zIndex = "10001";
    shield.style.filter = "alpha(opacity=50)";
    shield.style.opacity = 0.5;
	
    var alertFram = document.createElement("DIV");
    alertFram.id="alertFram";
    alertFram.style.position = "absolute";
    alertFram.style.left = "50%";
    alertFram.style.top = "50%";
    alertFram.style.marginLeft = "-295px" ;
    alertFram.style.marginTop = -180+document.documentElement.scrollTop+"px";
    alertFram.style.width = "590px";
    alertFram.style.height = "360px";
    //alertFram.style.background = "#004984";
    alertFram.style.textAlign = "center";
    alertFram.style.lineHeight = "150px";
    alertFram.style.zIndex = "10002";
	    var smsurl1,smsurl2;
		//alert(type);
		switch(type){			
			case "login":    //用户反馈
			             smsurl1="/login.php";
						 break;	
			case "infoshow":    //用户反馈
			             smsurl1=url;
						 break;	
			case "cj":    //用户反馈
			             smsurl1=url;
						 break;	
			default:	 
			              break;		
			}
	
	
    strHtml = "<div style=\"margin:0px 0px 0px 0px;padding:0px;width:585px;\">\n"; 
   	strHtml += "<IFRAME src="+smsurl1+" frameBorder=\"0\" width=\"585\" scrolling=\"no\" height=\"355\" id=\"msg_p\" name=\"msg_p\"></IFRAME>\n"  	
    strHtml += "</div>\n";	
	strHtml +="<div style=\"margin:0px;padding:0px;width:585px;\" align=\"right\"><input type=\"image\" src=\"http:\/\/zl.webxgame.com\/images\/tx_r7_c8.gif\"  border=\"0\" onclick=\"doOk();\"/ style=\"margin-right:20px;\"></div>\n";	
	
//shield.innerHTML="<img id=\"bj_image\" src=\"http:\/\/zl.webxgame.com\/images\/toming_bj.gif\" width=\"610\" height=\"388\" style=\"filter:alpha(opacity=80);-moz-opacity:0.8;\">"
    alertFram.innerHTML = strHtml;
	document.body.appendChild(bai_bj);
	document.body.appendChild(shield);
    document.body.appendChild(alertFram);    
	
    this.doOk = function(){
		document.body.removeChild(alertFram);
		document.body.removeChild(shield);
		 document.body.removeChild(bai_bj);
    }
	/*this.extendOk = function(){
		
		    var temp=document.getElementById("div_fx");
			var temp1=document.getElementById("bj_image");
			var temp2=document.getElementById("msg_fx");
			temp2.src=smsurl2;
			if(temp.style.display=='none'){
		    temp.style.display='block';	
			
			shield.style.height = "566px";
            shield.style.marginTop = -283+document.documentElement.scrollTop+"px";
            alertFram.style.height = "536px";
			alertFram.style.marginTop = -268+document.documentElement.scrollTop+"px";
			
			temp1.src="/css/blue/toming_bj2.gif"
			temp1.height="563"
			}else{
				temp.style.display='none';	
				alertFram.style.height = "360px";
				shield.style.height = "390px";
				shield.style.marginTop = -195+document.documentElement.scrollTop+"px";
				alertFram.style.marginTop = -180+document.documentElement.scrollTop+"px";
				temp1.src="/css/blue/toming_bj.gif"
				temp1.height="388"
				}
		
    }*/
}
function close_ok(){
		alertFram = top.document.getElementById("alertFram");
		shield = top.document.getElementById("shield");
		bai_bj = top.document.getElementById("bai_bj");
        top.document.body.removeChild(bai_bj);
       top.document.body.removeChild(shield);
		top.document.body.removeChild(alertFram);
		
}