


function showLogIn()
{ 
	var Div_State=document.getElementById('TE_TOP');
	if(Div_State.style.display==''){
		Div_State.style.display='none';
		document.getElementById('Div_show_Member').style.display='';
		
		}
	else{Div_State.style.display='';document.getElementById('Div_show_Member').style.display='none';}
	
}


 function CheckLoginMember(str)
{ 
AXMLHttp=GetAXMLHttpObject();

var Login_E_Mail=document.Login.login_email.value;
var Login_E_Pwd=document.Login.login_pwd.value;
var Login_URL=document.Login.login_url.value;
var Login_Server=document.Login.login_secure_path.value;
var Login_Secure_Path;

if (Login_E_Mail=='')
{
	alert('Your E-Mail is blank!');
	document.Loing.login_email.focus();
	return false;
}
else if( Login_E_Pwd=='')
{
	alert('Your Password is blank!');
	document.Login.login_pwd.focus();
	return false;
}

if(Login_URL=='/signin.asp' || Login_URL=='/checkout.asp' ||Login_URL.match('basket.asp')!=null)
  {
	Login_Secure_Path="https://";
	}
else if(Login_URL=='/submit_design/default.asp' || Login_URL=='/submit_photo/default.asp' || Login_URL=='/competition_list.asp'){
	Login_Secure_Path="https://";
	}
else if(Login_URL=='/join.asp'){
	Login_Secure_Path="https://";
	}
else
{
	Login_Secure_Path="http://";
}

var url=Login_Secure_Path+Login_Server+"/member_login.asp";
url+="?e="+Login_E_Mail;
url+="&pwd="+Login_E_Pwd;
url+="&path="+Login_URL;
AXMLHttp.onreadystatechange=CallBack;
AXMLHttp.open("GET",url,true);
AXMLHttp.send(null);
}

function CallBack() 
{ 
if (AXMLHttp.readyState==4)
{ 
if(AXMLHttp.responseText==1)
{
document.getElementById("TE_TOP").style.display='none';
window.location.reload();
}

else if(AXMLHttp.responseText==2)
{
alert("Your password is incorrect, Please type again.");
return ;
}
else if(AXMLHttp.responseText==3)
{
alert("You are already logged in !");
return ;
}
else if(AXMLHttp.responseText==5){
	location.href='/convercheckout.asp';
	return ;
	}

}
}

function GetAXMLHttpObject()
{
var AXMLHttp=null;
try
  {AXMLHttp=new XMLHttpRequest();}
catch (e)
  {
  try
    {AXMLHttp=new ActiveXObject("Msxml2.XMLHTTP");}
    catch (e)
    {AXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");}
  }
return AXMLHttp;
}
 








if (!document.layers)
document.write('<div id="Floater" style="position:absolute; margin-left:675px;z-index:10 ">')
document.write('<layer id="Floater" >');


document.write("<table cellpadding=0 cellspacing=0 border='0' width=\"400px\">");
document.write("<tr>");
document.write("<td align=\"center\" valign=\"top\" style=\"padding-top:4px;\"><a href=\"/cart\"><img src=\"/images/cart_icon.gif\" border=\"0\"><br><a href=\"/free-web-site\"><img src=\"/images/free_go.gif\" border=\"0\"></a></td>");

document.write("<td valign=\"top\" >");

 
  
document.write("<table cellpadding=0 cellspacing=0 border='0'>");
document.write("<tr><td>");
var DropDownMenu_Arrays=new Array("&nbsp;Log In |","Join |","Submit |","Earn Points |"," Help");
document.write("<div>");
document.write("<ul id='MainTopMenus'>");
for(var i=0;i<DropDownMenu_Arrays.length;i++)
{
	if(i==0){At="class=firstlink";}else if(i==DropDownMenu_Arrays.length-1){At="class=lastlink";}else{At="";}
	
document.write("<li "+At+" >");
if(i==0)
	{
	document.write("<a href=\'javascript:showLogIn()\' onmouseover=\"dropdownmenu(this,event,menu1,'160px')\" onmouseout=\"delayhidemenu()\">"+DropDownMenu_Arrays[i]+"</a>");
	}
else
	{
	document.write("<a href=\'#\' onmouseover=\"dropdownmenu(this,event,menu"+(i+1)+",'160px')\" onmouseout=\"delayhidemenu()\">"+DropDownMenu_Arrays[i]+"</a>");
	}
	

document.write("</li>");
}
document.write("</ul>");
document.write("</div>");

document.write("</td></tr><tr><td>");

document.write("<div  id='TE_TOP' style='display:none;margin-left:5px; background:url(/images/login_bg2.gif) no-repeat;height:100px;'>");
document.write("<div style='padding:5px 0px 0px 10px'><a >Forgot password?</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:showLogIn()'>X close</a></div>");
document.write("<div style='padding-left:10px;padding-top:6px;'>");
document.write("<form name=Login onSubmit='return false'>");
document.write("<input type=hidden value='"+Login_Path+"' name='login_secure_path' id='login_secure_path'>");
document.write("<input type=hidden value='"+Login_URL+"' name='login_url' id='login_url'>");
document.write("<input type=text name='login_email' id='login_email' value='"+Member_Email+"' size=28  class=topheadinput>&nbsp;");
document.write("<input type=password name='login_pwd'  id='login_pwd'  size=11 class=topheadinput>&nbsp;");
document.write("<input type=submit value=Go  onClick='CheckLoginMember()' class=topheadsubmit>");
document.write("</form>");
document.write("</div>");
document.write("<div id=\"show_ErrorMsg\"></div>");
document.write("</div>");

document.write("</td></tr></table></td></tr>");
document.write("</table>");


document.write('</div>');


 
  

function JSFX_FloatTopDiv()
{
	var placeX =0,
	placeY = 0;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function DeLayer(id)
	{
		var GetElements=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)GetElements.style=GetElements;
		GetElements.sP=function(x,y){this.style.left=x-9;this.style.top=y;};
		GetElements.x = placeX;
		GetElements.y = ns ? pageYOffset  : document.body.scrollTop + 0;
		GetElements.y -= -placeY;
		return GetElements;
	}
	window.stayTopLeft=function()
	{
		var pY = ns ? pageYOffset  : document.body.scrollTop + 0 ;
		ftlObj.y += (pY - -placeY - ftlObj.y)/15;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = DeLayer("Floater");
	stayTopLeft();
}
 
  //if(FloatOrLockTxt=='1'){
 JSFX_FloatTopDiv(); //}

