
 
function el(id)
{
	if (document.getElementById)
	{
		return document.getElementById(id);
	}
	else if (window[id])
	{
		return window[id];
	}
	
	return null;
}

function ResetInput()
{
	el('txtCorpAbbrName').value = '';
	el('txtLogonName').value = '';
	el('txtUserPassword').value = '';
	el('txtValidateCode').value = '';
}
function getHTML()
{   
     var url = '../Control/bulletinlist.aspx';  
     if (document.getElementById("boxNavigation")!=null )
     {
	    $("#boxNavigation").load(url+"?id="+Math.random());
	 }
}
window.setTimeout("getHTML()",1000);
timer1=setInterval('getHTML()',1000*60*50);
function getFocusDefault()
{
	var f = null;
	if (document.getElementById)
	{
		f = document.getElementById("index");
	}
	else if (window.Login) 
	{ 
		f = window.Login;
	}
	if (f)
	{
		var cn	= f.txtCorpAbbrName;
		if(null!=cn)
		{
			if (f.txtCorpAbbrName.value == null || f.txtCorpAbbrName.value == "")
			{
				f.txtCorpAbbrName.focus();
			}
			else if(f.txtLogonName.value == null || f.txtLogonName.value == "")
			{
				f.txtLogonName.focus();
			}
			else if(f.txtUserPassword.value == null || f.txtUserPassword.value == "")
			{
				f.txtUserPassword.focus();
			}
			else if(f.txtValidateCode.value == null || f.txtValidateCode.value == "")
			{
				f.txtValidateCode.focus();
			}
		}
	}
}



function OpenLoginDialog(bTaste)
{
	window.showModalDialog("../Page/LoginDialog.aspx?bTaste="+bTaste,this, "dialogtop:100px;dialogleft:100px;dialogWidth:500px;dialogHeight:350px;edge:sunken;help:no;status:no;scroll:no;");
	return false;
}
function ReturnValue(url)
{
	if(url=='index.aspx')
	{
		parent.location.href=url;
	}
	else if(url=='RegisterTasteAgreement.aspx')
	{
		parent.location.href='RegisterTasteAgreement.aspx';
		//document.location.href = 'RegisterTasteAgreement.aspx';
	}
}
function SetAutoResize(iframename)
{
	try
	{
		document.all(iframename).style.height	= eval(iframename).document.body.scrollHeight;
	}
	catch(e)
	{
		//alert(e.name + ": " + e.message);
	}
}
function hrefdetails(appid,type,flag){
	if (flag==1)
	{
		window.open("ProductDetail.aspx?AppID="+appid+"&Type=4");
	}
	else{
	    
		window.location.href="../Page/ProductDisplay.aspx?TransferUrl="+url;
	}
	
}
function hrefdetails2(url,appid,flag)
{  
    if (flag==1)
	{
		window.open("ProductDetail.aspx?AppID="+appid+"&Type=4");
	}
	else
	{
		window.location.href="../Page/ProductDisplay.aspx?TransferUrl="+url;
	}
}
function productdetails(url)
{     
    window.location.href="../Page/ProductDisplay.aspx?TransferUrl="+url;
	 
}
function windowqzServiceUse(appid, flag){
//	if (flag==1)
//	{
//		window.open("PagesEmbedded/ServiceUse.aspx?AppID="+ appid);
//	}
//	else{
//		window.open("../Manager/ServiceUse.aspx?AppID="+ appid);
//	}
	window.open("../Manager/ServiceUse.aspx?AppID="+ appid);
}

function CloseFloatImage()
{
	if (document.getElementById("JBLStatic") !=null)
		document.getElementById("JBLStatic").style.visibility='hidden';
	if (document.getElementById("LBJStatic") !=null)
		document.getElementById("LBJStatic").style.visibility='hidden';
}
//显示右对联
function PlayrightImageList(ss){
	var leftsize, rightsize, indexwidth, numsize, divwidth;
	indexwidth =776;
	numsize=0;
	divwidth = 79;
	leftsize =5;
	rightsize =895;
	if (window.screen.width >1000)
	{	
		if (ss !="")
		{	//2007-07-30  linyx   修改
			if (window.screen.width >1025){
				numsize =window.screen.width - indexwidth;
				if (numsize > 0)
				{
					leftsize = numsize / 2 - divwidth - 2;
					rightsize =(window.screen.width + indexwidth) / 2 -1;
				}
			}
			document.write("<div id='JBLStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ rightsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;'> ");
			document.write("<p align='center'>");
			document.write("<A class='all' onclick='javascript:CloseFloatImage();' href='#'><font color='#ff0000'>关闭</font></A>");
			document.write(ss);
			document.write("</p>");
			document.write("</div>");
		}
		else{
			document.write("<div id='JBLStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ rightsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;visibility: hidden;'> ");
			document.write("</div>");
		}
	}
	else{
			document.write("<div id='JBLStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ rightsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;visibility: hidden;'> ");
			document.write("</div>");
	}
}
//显示左对联
function PlayleftImageList(ss){
	var leftsize, rightsize, indexwidth, numsize, divwidth;
	indexwidth =776;
	numsize=0;
	divwidth = 79;
	leftsize =5;
	rightsize =895;
	if (window.screen.width >1000)
	{	
		if (ss !="")
		{	
			if (window.screen.width >1025){
				numsize =window.screen.width - indexwidth;
				if (numsize > 0)
				{
					leftsize = numsize / 2 - divwidth - 40;
					rightsize =(window.screen.width + indexwidth) / 2 + 2;
				}
			}
			document.write("<div id='LBJStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ leftsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;'> ");
			document.write("<p align='center'>");
			document.write("<A class='all' onclick='javascript:CloseFloatImage();' href='#'><font color='#ff0000'>关闭</font></A>");
			document.write(ss);
			document.write("</p>");
			document.write("</div>");
		}
		else{
			document.write("<div id='LBJStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ rightsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;visibility: hidden;'> ");
			document.write("</div>");
		}
	}
	else{
			document.write("<div id='LBJStatic' style='BORDER-RIGHT: #000000 1px; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #000000 1px; Z-INDEX: 25; BACKGROUND-ATTACHMENT: scroll; LEFT: "+ rightsize + "px; BORDER-LEFT: #000000 1px; WIDTH: " + divwidth + "px; BORDER-BOTTOM: #000000 1px; BACKGROUND-REPEAT: repeat; POSITION: absolute; TOP: 50px; HEIGHT: 178px; BACKGROUND-COLOR: #ffffff; layer-background-color: #ffffff;visibility: hidden;'> ");
			document.write("</div>");
	}
}
 
    