var string_w = '<div id="common_login" class="dk_confim" style="display:none ; position: fixed; width: 100%; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 999;"><div style="position: absolute; top: 50%; left: 50%; margin-left: -200px; margin-top: -136px; z-index: 1000; opacity: 1;"class="dk_confirm prompt">'
string_w +='<div class="dk_confimocont">';
 string_w +=  '  <div class="dk_confim_add dk_confim_header">';
 string_w +=    '    <span class="dk_confim_addleft"></span>';
 string_w +=   '     <h5>来客网特别提醒</h5>';
 string_w +=   '     <span class="dk_confim_addright"></span>            </div>';
 string_w +=   ' <div title="关闭" class="dk_confimclose" onclick="commonclose()">&nbsp;</div>';
 string_w +=  '  <div class="dk_confimmain">';
 string_w +=       ' <div class="dk_confirmmsg">';
 string_w +=        '   <dl><dt style="text-align:center;width:300px;"> <h2 id="login_title" style="color:#FF0000">你还没有登录，请先登录。</h2></dt></dl>';
 string_w +=        '    <dl><dt>帐　号：</dt><dd><input type="text" class="inp_txt" id="common_userName" name="common_userName" value="" /></dd></dl>';
 string_w +=          '  <dl><dt>密　码：</dt><dd><input type="password" class="inp_txt" id="common_userPass" name="common_userPass" /></dd></dl>';
 string_w +=         '  <p style="text-align:center">';
 string_w +=        '        <a href="javascript:commonlogin()"><img src="/images/login_btn.jpg" /></a>';
 string_w +=        '       <a href="/users/lostpassword" target="_blank" class="blue">忘记密码</a>';
 string_w +=       '     </p>';
 string_w +=       '     <h4 style="text-align:center">还不是来客网用户,<a href="/users/register" target="_blank" class="blue">赶紧注册去</a></h4>';
 string_w +=        '</div></div></div></div></div>';
function commonshow(i){
	$('#login_title').html(i);
	$('#common_login').show('slow');
}
function commonclose(){
	$('#common_login').hide('slow');
}
function commonlogin(){
	var userName = $('#common_userName').val();
	var userPass = $('#common_userPass').val();
	if(userName.length==0||userPass.length==0)
	{
		$('#login_title').html('帐号或者密码不能为空。');
		return;
	}
	$.post('/ajax/comLogin',{username:userName,password:userPass},
		function(result){
			if(result.status==3){
				location.reload();
			}else{
				$('#login_title').html(result.msg);
			}
		},'json');
}
$(document).ready(function(){
	$(".bottom").after(string_w); 
}); 


