// JavaScript Document
function sAlert(strTitle,strContent){    
	var msgw,msgh,bordercolor;    
	msgw=400;//提示窗口的宽度    
	msgh=100;//提示窗口的高度    
	titleheight=25 //提示窗口标题高度    
	bordercolor="#336699";//提示窗口的边框颜色    
	titlecolor="#99CCFF";//提示窗口的标题颜色    

	var sWidth,sHeight;    
	sWidth=document.body.scrollWidth;
	sHeight=screen.height;
	if(document.body.offsetHeight>screen.height)
		sHeight=document.body.offsetHeight; //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 = "10000";    
	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 ="25px";    
	msgObj.style.zIndex = "10001";    

	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.title = "点击关闭";   
	title.innerHTML="<table border='0' width='100%'><tr><td align='left' width='90%'><b>"+ strTitle +"</b></td><td>关闭</td></tr></table></div>";    
	title.onclick=function closeAlert(){    
		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=strContent;    
	document.getElementById("msgDiv").appendChild(txt);    
} 
function closeAlert(){    
		document.body.removeChild(document.getElementById("bgDiv"));    
		document.getElementById("msgDiv").removeChild(document.getElementById("msgTitle"));    
		document.body.removeChild(document.getElementById("msgDiv"));    
}
/*
window.onresize=function(){
	if(document.getElementById("bgDiv")){ 
		var bgObj=document.getElementById("bgDiv"); 
		var sWidth,sHeight;    
		sWidth=document.documentElement.scrollWidth;
		//sHeight=screen.height;
		//if(document.documentElement.offsetHeight>screen.height)
		sHeight=document.documentElement.scrollHeight; //screen.height; 
		bgObj.style.width=sWidth + "px";    
		bgObj.style.height=sHeight + "px";		
	}
}
*/
var strContent1="";

/*
strContent1=strContent1+'<form action="/member/login.asp" method="post" name="login" target="_self">';
strContent1=strContent1+'  <div id="login2"><img onlocd="correctPNG();" id="pangLogin" src="/images/login2.png" width="364" height="272" border="0" usemap="#Map" />';
strContent1=strContent1+'<map name="Map" id="Map">';
strContent1=strContent1+'<area shape="rect" coords="33,10,136,43" href="/" target="_self" alt="原文小说网" />';
strContent1=strContent1+'</map>';
strContent1=strContent1+'	<div  class="login2_b">会员登录</div>';
if(window.location.href != "http://www.yuanwen.com/member/entrance.asp")
	strContent1=strContent1+'   <div  class="Close"><a href="javascript:closeLoginDialog();" title="关闭" target="_self"><img src="/images/Close.gif" width="15" height="15" /></a></div>'
strContent1=strContent1+'		<div  class="login2_bb">您还没有登陆，请您登陆！</div>';
strContent1=strContent1+'		<div  class="login2_b2">用户名:<input name="name" type="text" class="text" id="name" value=""  maxlength="16" /></div>';
strContent1=strContent1+'		<div  class="login2_b3">密&nbsp;&nbsp;码:<input name="pwd" type="password" class="text" id="pwd" maxlength="20" /></div>';
strContent1=strContent1+'		<div  class="login2_b4"><input type="image" name="imageField" id="imageField" src="/images/login_an2.gif" /><input name="action" type="hidden" id="action" value="login"/><input name="fromUrl" id="fromUrl" type="hidden" value="" /> ';
strContent1=strContent1+'	</div>';
strContent1=strContent1+'		 <div  class="login2_b5"><input name="reMe" type="checkbox" id="reMe" value="reMe"/>记住我</div>';
strContent1=strContent1+'		 <div  class="login2_b6">&gt;&gt; <a href="/member/getpass.html" target="_blank">忘记密码了</a>&nbsp;&nbsp; &gt;&gt; <a href="/member/reg1.html" target="_blank">新用户注册</a></div>';
strContent1=strContent1+'  </div>';
strContent1=strContent1+'</form>';
*/


//strContent1=strContent1+"<div id='login_B'>";
strContent1=strContent1+"	<div class='login_b1'>";
strContent1=strContent1+"		<div class='top'>";
strContent1=strContent1+"			<H6>会员登录</H6>";
strContent1=strContent1+"			<span class='ttt'>您还没有登陆，请您登陆！</span>";
if(window.location.href.indexOf("entrance.asp") == -1 && window.location.href.indexOf("selectcase") == -1 && window.location.href.indexOf("vipcommend") == -1)
	strContent1=strContent1+"			<span class='Close'><a href='javascript:void(0);' onclick='javascript:closeLoginDialog();'><img src='http://pic.yuanwen.com/images/Close2.gif' width='16' height='15' hidefocus='true' />&nbsp;关闭</a></span>";
strContent1=strContent1+"		</div>";
strContent1=strContent1+"		<div class='from2'>";
strContent1=strContent1+"			<table width='87%' border='0' align='center' cellpadding='0' cellspacing='3'>";
strContent1=strContent1+"			<form name='login_form' method='post' action='http://www.yuanwen.com/member/login.asp' onsubmit='return checkloginform();'>";
strContent1=strContent1+"				<input name='action' type='hidden' id='action' value='login'/>";
strContent1=strContent1+"				<input name='fromUrl' id='fromUrl' type='hidden' value='' />";
strContent1=strContent1+"				<tr>";
strContent1=strContent1+"					<td width='38%' align='right' class='txt14'>账号/手机:</td>";
strContent1=strContent1+"					<td width='62%'><label><input type='text' name='name' class='text' id='name' maxlength='16' /></label></td>";
strContent1=strContent1+"				</tr>";
strContent1=strContent1+"				<tr>";
strContent1=strContent1+"					<td align='right' class='txt14'>密 码:</td>";
strContent1=strContent1+"					<td><label><input type='password' name='pwd' class='text' id='pwd' maxlength='20' /></label></td>";
strContent1=strContent1+"				</tr>";
strContent1=strContent1+"				<tr>";
strContent1=strContent1+"					<td>&nbsp;</td>";
strContent1=strContent1+"					<td class='but'><label><input name='submit' type='submit' id='submit' style='background-image:url(http://www.yuanwen.com/images/but_loging.gif); width:108px; height:33px; border:0px; cursor:pointer' value='' /></label><span><a href='http://www.yuanwen.com/member/reg1.html' target='_blank' hidefocus='true'>免费注册</a></span></td>";
strContent1=strContent1+"				</tr>";
strContent1=strContent1+"				<tr>";
strContent1=strContent1+"					<td colspan='2' align='center'>&gt;&gt; <a href='http://www.yuanwen.com/setting/setting.html' target='_blank' hidefocus='true'>手机注册未设置密码入口 </a>&gt;&gt; <a href='http://www.yuanwen.com/member/getpass.html' target='_blank' hidefocus='true'>忘记密码了</a></td>";
strContent1=strContent1+"				</tr>";
strContent1=strContent1+"			</form>";
strContent1=strContent1+"			</table>";
strContent1=strContent1+"		</div>";
strContent1=strContent1+"	</div>";
strContent1=strContent1+"    <div class='login_b2'></div>";
//strContent1=strContent1+"</div>";


function LoginDialog(strTitle,strContent){    
	var msgw,msgh,bordercolor;    
	msgw=0;//提示窗口的宽度    
	msgh=0;//提示窗口的高度    
	titleheight=25 //提示窗口标题高度    
	bordercolor="#336699";//提示窗口的边框颜色    
	titlecolor="#99CCFF";//提示窗口的标题颜色    

	var sWidth,sHeight;
	if(document.getElementById("mainNav"))
		sWidth=document.getElementById("mainNav").offsetWidth;//document.documentElement.scrollWidth;
	else
		sWidth=document.documentElement.scrollWidth;
	sHeight=document.documentElement.scrollHeight;
	if(sHeight<document.documentElement.clientHeight)
		sHeight=document.documentElement.clientHeight; //screen.height;    
	var bgObj=document.createElement("div"); 
	bgObj.setAttribute('id','bgDiv');    
	bgObj.style.position="absolute";    
	bgObj.style.top="0";    
	bgObj.style.background="#EFEFEF";    
	bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=40,finishOpacity=40"; 
	bgObj.style.opacity="0.4";
	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","loginN_B");    
	document.body.appendChild(msgObj);    
	var txt=document.createElement("div");
	txt.setAttribute("id","msgTxt");    
	txt.innerHTML=strContent;
	document.getElementById("loginN_B").appendChild(txt);

	//correctPNG();
} 
function closeLoginDialog(){    
	document.body.removeChild(document.getElementById("bgDiv"));  
	document.body.removeChild(document.getElementById("loginN_B"));    
}
window.onresize=function(){
	if(document.getElementById("bgDiv")){
		if(document.getElementById("mainNav"))
			document.getElementById("bgDiv").style.width=document.getElementById("mainNav").offsetWidth;
		else
			document.getElementById("bgDiv").style.width=document.documentElement.scrollWidth;
		document.getElementById("bgDiv").style.height=document.documentElement.scrollHeight;
	}
}
function checkloginform()
{
	var thisform=document.getElementById('login_form');
	if(thisform.name.value=="")
	{
		alert('请输入账号/手机号!');
		thisform.name.focus();
		return false;
	}
	if(thisform.pwd.value=="")
	{
		alert('请输入账号密码!');
		thisform.pwd.focus();
		return false;
	}
}