﻿var hrefurl;
function SAlert(message,href,path,top)
{
    if(navigator.appName=="Microsoft Internet Explorer")
    {
        if(document.readyState=="complete")
        {
            SAlertMessage(message,href,"");
        }
        else
        {
            window.setTimeout(function(){SAlert(message,href,path,top);},200);
        } 
    }
    else
    {
        SAlertMessage(message,href,"");
    }
}
function SAlertb(message,href,path,top)
{
    if(navigator.appName=="Microsoft Internet Explorer")
    {
        if(document.readyState=="complete")
        {
            SAlertMessage(message,"","关 闭");
        }
        else
        {
            window.setTimeout(function(){SAlertb(message,href,path,top);},200);
        }
    }
    else
    {
       SAlertMessage(message,"","关 闭");
    }
}

function SAlertc(message,href,oneBut)
{
    if(navigator.appName=="Microsoft Internet Explorer")
    {
        if(document.readyState=="complete")
        {
            SAlertMessage(message,"",oneBut);
        }
        else
        {
            window.setTimeout(function(){SAlertb(message,href,path,top);},200);
        }
    }
    else
    {
       SAlertMessage(message,"",oneBut);
    }
}

function SAlertMessage(message,href,oneBut)
{
      hrefurl=href;
       var div=document.createElement("DIV");
       div.id="div_lock";
       div.style.position="absolute";
       
       div.style.width="100%";
       div.style.height=document.body.scrollHeight+"px"; 
       if(document.documentElement.clientHeight>document.body.scrollHeight)
       {
            div.style.height=document.documentElement.clientHeight+"px";
       }
       
       if(oneBut=="")
       {
            oneBut="返 回";
       }
       
       div.style.zIndex="990";
       div.style.left="0px";
       div.style.top="0px";
       div.style.filter="alpha(opacity=30)";
       div.style.backgroundColor="#000000";
       div.style.opacity="0.3";//透明效果(firefox)
       
       var divMessage=document.createElement("DIV");
       divMessage.id="div_message";
       divMessage.style.position="absolute";
       divMessage.style.width="527px";
       //divMessage.style.height="175px";
       divMessage.style.zIndex="991";
       divMessage.style.left=(document.body.offsetWidth-527)/2+"px";
       //divMessage.style.top=document.documentElement.scrollTop+(document.documentElement.clientHeight-175)/2+"px";
       divMessage.style.top=document.documentElement.scrollTop+150+"px";
       
       var htmltext="<table width=\"527px\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
       htmltext+="<td width=\"28px\" height=\"65px\"><img src=\"/images/ts1.gif\" width=\"28px\" height=\"65px\" /></td>";
       htmltext+="<td width=\"267px\" align=\"left\" valign=\"top\" background=\"/images/ts2.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
       htmltext+="<tr>";
       htmltext+="<td height=\"15\" align=\"left\" valign=\"top\"><img src=\"/images/ts9.gif\" width=\"33\" height=\"13\" /></td>";
       htmltext+="</tr>";
       htmltext+="<tr>";
       htmltext+="<td height=\"38\" align=\"left\" class=\"ts-1\" style=\"font-size:14px;\">爱在中国</td>";
       htmltext+="</tr>";
       htmltext+="</table></td>";
       htmltext+="<td width=\"205\" align=\"right\" valign=\"top\" background=\"/images/ts2.gif\"><table width=\"80\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
       htmltext+="<tr>";
       htmltext+="<td height=\"13\"></td>";
       htmltext+="</tr>";
       htmltext+="<tr>";
       htmltext+="<td height=\"35\" align=\"center\" valign=\"top\"><img src=\"/images/ts11.gif\" onclick=\"messageClose();\" name=\"关闭\" width=\"48\" height=\"28\" border=\"0\" style=\"cursor:pointer;\" onmouseover=\"this.src='/images/ts10.gif'\" onmouseout=\"this.src='/images/ts11.gif'\"/></td>";
       htmltext+="</tr>";
       htmltext+="</table></td>";
       htmltext+="<td width=\"27\"><img src=\"/images/ts3.gif\" width=\"28\" height=\"65\" /></td>";
       htmltext+="</tr>";
       htmltext+="<tr>";
       htmltext+="<td height=\"100%\" background=\"/images/ts4.gif\">&nbsp;</td>";
       htmltext+="<td height=\"99\" colspan=\"2\" align=\"left\" valign=\"top\" style=\"background-color:#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"a13-h22\">";
       htmltext+="<tr>";
       htmltext+="<td width=\"34%\" height=\"96\" valign=\"top\">";
       htmltext+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"150\" height=\"160\" title=\"爱在中国-征婚，交友，爱情\" style=\"border-right-width: 1px;border-right-style: solid;border-right-color: #DCDCDC;\">";
       htmltext+="<param name=\"movie\" value=\"/images/logo.swf\" />";
       htmltext+="<param name=\"quality\" value=\"high\" />";
       htmltext+="<param name=\"wmode\" value=\"transparent\" />";
       htmltext+="<embed src=\"/images/logo.swf\" width=\"150\" height=\"160\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" ></embed>";
       htmltext+="</object>";
       htmltext+="</td>";
       htmltext+="<td width=\"66%\" align=\"left\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";       
       htmltext+="<tr>";
       htmltext+="<td height=\"60\" align=\"left\" valign=\"top\">";
       htmltext+= message;
       htmltext+="</td>";
       htmltext+="</tr>";
       htmltext+="</table>";
       htmltext+="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
       htmltext+="<tr>";
       htmltext+="<td height=\"36\" align=\"center\"><input type=\"button\" class=\"tishi-an1\" id=\"tishi_close_button\" hidefocus='true' style=\"cursor:pointer;\"  onclick=\"messageCloseHref();\" value=\""+oneBut+"\" /><input type=\"button\" class=\"tishi-an2\" onclick=\"window.location.href='/default.shtml'\" id=\"button\" style=\"cursor:pointer;\"  value=\"返回主页\" /></td>";
       htmltext+="</tr>";
       htmltext+="</table></td>";
       htmltext+="</tr>";
       htmltext+="</table></td>";
       htmltext+="<td height=\"100%\" background=\"/images/ts5.gif\">&nbsp;</td>";
       htmltext+="</tr>";
       htmltext+="<tr>";
       htmltext+="<td height=\"26\"><img src=\"/images/ts6.gif\" width=\"28\" height=\"26\" /></td>";
       htmltext+="<td height=\"26\" colspan=\"2\" background=\"/images/ts7.gif\">&nbsp;</td>";
       htmltext+="<td height=\"26\"><img src=\"/images/ts8.gif\" width=\"28\" height=\"26\" /></td>";
       htmltext+="</tr>";
       htmltext+="</table>";
       divMessage.innerHTML=htmltext;

       var selectarr=document.getElementsByTagName("select");
       for(var cnt=0;cnt<selectarr.length;cnt++)
       {
           selectarr[cnt].style.visibility="hidden";
       }    
       document.body.appendChild(div);
       document.body.appendChild(divMessage);       
       document.getElementById("tishi_close_button").focus();
       
       window.onresize=function()
       {
            div.style.width="100%";
            div.style.height=document.body.scrollHeight+"px"; 
            if(document.documentElement.clientHeight>document.body.scrollHeight)
            {
                div.style.height=document.documentElement.clientHeight+"px";
            }
            
            document.getElementById("div_message").style.left=(document.body.offsetWidth-527)/2+"px";
            document.getElementById("div_message").style.top=document.documentElement.scrollTop+150+"px";
       }
}
function messageCloseHref()
{
    var selectarr=document.getElementsByTagName("select");
    for(var cnt=0;cnt<selectarr.length;cnt++)
    {
        selectarr[cnt].style.visibility="";
    }
    document.body.removeChild(document.getElementById("div_message"));
    document.body.removeChild(document.getElementById("div_lock"));
    if(hrefurl!="#" & hrefurl!="")
    {
        window.location.href=hrefurl;
    }
    
    window.onresize=null;
}

function messageClose()
{
    var selectarr=document.getElementsByTagName("select");
    for(var cnt=0;cnt<selectarr.length;cnt++)
    {
        selectarr[cnt].style.visibility="";
    }
    document.body.removeChild(document.getElementById("div_message"));
    document.body.removeChild(document.getElementById("div_lock"));

    window.onresize=null;
}


function Login()
{
    var div=document.createElement("DIV");
   div.id="div_lock";
   div.style.width="100%";
   div.style.position="absolute";
   div.style.height=document.body.scrollHeight+"px"; 
   div.style.zIndex="990";
   div.style.left="0px";
   div.style.top="0px";
   div.style.filter="alpha(opacity=30)";
   div.style.backgroundColor="#000000";
   div.style.opacity="0.3";//透明效果(firefox)
   

    
   
   var divMessage=document.createElement("DIV");
   divMessage.id="div_message";
   divMessage.style.position="absolute";
   divMessage.style.textAlign="left";
   divMessage.style.width="307px";
   divMessage.style.height="175px"; 
   divMessage.style.zIndex="991";
   divMessage.style.left=(document.body.offsetWidth-307)/2+"px";
   divMessage.style.top=document.documentElement.scrollTop+(document.documentElement.clientHeight-175)/2+"px";
   
    
   divMessage.innerHTML="<table width='307' border='0' cellspacing='0' cellpadding='0'>"+
  "<tr>"+
    "<td height='54' align='left' valign='top'>"+
    "<table width='307' border='0' cellspacing='0' cellpadding='0'>"+
      "<tr>"+
        "<td height='13' background='/images/42.gif'></td>"+
      "</tr>"+
    "</table>"+
     " <table width='307' border='0' cellspacing='0' cellpadding='0'>"+
        "<tr><td height='41' align='center' valign='top' background='/images/529.GIF'><table width='270' border='0' cellspacing='0' cellpadding='0'>"+
            "<tr><td width='210' height='39' align='left' class='a30-31'>&nbsp; 用户登陆</td>"+
              "<td width='60' align='right'>"+
              "<img src='/images/40.gif' alt='关闭' name='Image1' width='20' height='20' border='0' id='Image1' style='cursor:pointer;' onmouseover='this.src=\"/images/41.gif\"' onmouseout='this.src=\"/images/40.gif\"' onclick='javascript:document.body.removeChild(document.getElementById(\"div_lock\"));document.body.removeChild(document.getElementById(\"div_message\"));' />"+
               "</td></tr></table>"+
            "<table width='276' border='0' cellspacing='0' cellpadding='0' height='2'>"+
             "<tr><td><img src='/images/674.jpg' width='276' height='2' /></td>"+
             " </tr></table></td>"+
        "</tr></table>"+
"</td></tr></table>";
   var div_ifream=document.createElement("DIV");
   div_ifream.style.width="100%";
   div_ifream.style.height="155px";
   div_ifream.innerHTML="<iframe name='BoardList' width='307' height='155px' frameborder='0' src='/LoginIfream.aspx' scrolling='no' id='down'/></iframe>";
   
   divMessage.appendChild(div_ifream);
   document.body.appendChild(div);
   document.body.appendChild(divMessage);  
}