﻿function killErrors() {
    return true;
}
window.onerror = killErrors;

function none(id)
{
document.getElementById(id).display='block';
} 
 

  var mycookie = document.cookie;  
  function readcookie(name) 
  { 
  var start1 = mycookie.indexOf(name + "="); 
  if (start1== -1) 
  document.getElementById('Count').innerHTML='<span class="Count">Items(<font color="red">0</font>)- $ 0</span>';
  else 
  { 
  start=mycookie.indexOf("=",start1)+1;  
  var end = mycookie.indexOf(";",start); 
  if (end==-1) 
  { 
  end=mycookie.length;
  } 
  var value=unescape(mycookie.substring(start,end)); 
  if (value==null) 
  {document.getElementById('Count').innerHTML='<span class="Count">Items(<font color="red">0</font>) - $ 0</span>';} 
  else 
  {
	var va = value.split('|');
  document.getElementById('Count').innerHTML='<span class="Count">Items(<font color="red">'+va[0]+'</font>) - $ <font color="red">'+va[1]+'</font></span>';} 
  } 
  } 
    



function   fun()   
      {if(document.getElementById('sel').value=='0')   
            {   
alert('Please select the size you buy @_@');
              return   false   ;
              }   
      }   
function show()
    {
        var msg=document.getElementById('txtProName');
       window.location.href="../Search.aspx?query="+msg.value;
    } 
if (document.getElementById){ 
document.write('<style type="text/css">\n')
document.write('.Replica-Handbags-SubMenu{display: none;}\n')
document.write('</style>\n')
}

function Handbags(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); 
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="Replica-Handbags-SubMenu") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
	readcookie('User');
 
}


function showme(obj)
{
 var oSon=window.document.getElementById("hint");
 if (oSon==null) return;
 with (oSon) 
 {
  innerHTML="<img src="+obj+" />";
  style.display="block";
  style.pixelLeft=window.event.clientX+window.document.body.scrollLeft+6;
  style.pixelTop=window.event.clientY+window.document.body.scrollTop+9;
 }
}
function hidme()
{
 var oSon=window.document.getElementById("hint");
 if (oSon==null) return;
 oSon.style.display="none";
}

 function winopen(url,title,height,width)
{
 xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ))
{
xposition = (screen.width - width) / 2;
yposition = (screen.height - height) / 2;
}
theproperty= "width=" + width + "," 
+ "height=" + height + "," 
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=1,"
+"scrollbar=yes,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //for Netscape
+ "screeny=" + yposition + "," //for Netscape
+ "left=" + xposition + "," //for IE
+ "top=" + yposition; //for IE 
window.open( url,title,theproperty );
}
/*	onload = readcookie('User')*/


	 function btnSubmit_onclick() {
            var strUserName = document.getElementById("subscribename").value;
 
if(isemail(strUserName))
{
            var xmlHttpReq = new XMLHttpRequest();

            if (!xmlHttpReq) 
			   {
                xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");

                  if (!xmlHttpReq)
				  {
                    xmlHttpReq = new ActiveXObject("MSXML2.XMLHTTP");
                  }
               }

            if (xmlHttpReq) 
			{
                var strUrl = "subscribe.aspx?Email=" + strUserName;
                xmlHttpReq.open("POST", strUrl, false);
		window.alert("Please check email and confirm!");
                xmlHttpReq.onreadystatechange = function() {
                    if (xmlHttpReq.readyState == 4) {
					
                        if (xmlHttpReq.status == 200) {
                            
                          // window.alert("Please check email and confirm!");
                        }
                    }
                }
                xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                //xmlHttpReq.send("UserName=" + strUserName + "&Password=" + strPassword);
                xmlHttpReq.send(null);
            }
            else {
            }
	}
	else{ window.alert("The Email is not right!");}
  }
    
function isemail(str)
{
    var result=str.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/);
    if(result==null) return false;
    return true;
}