<!--
function popupWindow(url)
{
    window.open(url,'Big_Picture','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=650,height=650,top=0,left=0');
    //return true;
}
function productSearch()
{
    var val = document.forms[0].keywords.value;
    //if(val != null && val.length > 3){
        location.href = '/ProductSearchResult.aspx?keyword=' + val;
    //}else{
    //    alert('The keyword is too short');
    //}
}

function testForEnter() 
{    
    if (event.keyCode == 13) 
    {        
        event.cancelBubble = true;
        event.returnValue = false;
    }
}

function testEnter() 
{    
    var key = event.keyCode?event.keyCode:event.which;
    alert(key);
    if (key == 13) 
    { 
        window.event.cancelBubble = true;
        window.event.returnValue = false;  
        productSearch();
    }
}

function pageSkip(){
   var val =  document.getElementById("ctl00_ContentPlaceHolder_Customer_url").value + "/page" + 
        document.forms[0].pageSelect.options[document.forms[0].pageSelect.selectedIndex].value;
    location.href = val + '.aspx';
} 
function pageSkip2(){
   var val = document.getElementById("ctl00_ContentPlaceHolder_Customer_url").value + "/page" + 
        document.forms[0].pageSelect2.options[document.forms[0].pageSelect2.selectedIndex].value;
    location.href = val + '.aspx';
} 

function pageFeaturedSkip(){
    var val = document.forms[0].pageSelect.options[document.forms[0].pageSelect.selectedIndex].value;
    var sortID = document.getElementById("ctl00_ContentPlaceHolder_Customer_hidSortID").value;
    location.href = '/featuredproducts/' + sortID + '/page' + val + '.aspx';
} 
function pageFeaturedSkip2(){
    var val = document.forms[0].pageSelect2.options[document.forms[0].pageSelect2.selectedIndex].value;
    var sortID = document.getElementById("ctl00_ContentPlaceHolder_Customer_hidSortID").value;
    location.href = '/featuredproducts/' + sortID + '/page' + val + '.aspx';
}

function pageSearchSkip(){
    var val = document.getElementById("ctl00_ContentPlaceHolder_Customer_hidUrl").value + "/page" + 
        document.forms[0].pageSelect.options[document.forms[0].pageSelect.selectedIndex].value;
    location.href = '/Search/' + val + '.aspx';
} 
function pageSearchSkip2(){
    var val = document.getElementById("ctl00_ContentPlaceHolder_Customer_hidUrl").value + "/page" 
        + document.forms[0].pageSelect2.options[document.forms[0].pageSelect2.selectedIndex].value;
    location.href = '/Search/' + val + '.aspx';
} 

function AddToCart(prodID){
    location.href = '/ShoppingCart.aspx?prodID=' + prodID;
}



function CharMode(iN)
{      
        if (iN>=48 && iN <=57) //数字      
        return 1;      
        if (iN>=65 && iN <=90) //大写字母      
        return 2;      
        if (iN>=97 && iN <=122) //小写      
        return 4;      
        else      
        return 8; //特殊字符      
 }
 
function bitTotal(num)
{      
        modes=0;      
        for (i=0;i<4;i++){      
        if (num & 1) modes++;      
        num>>>=1;      
        }      
        return modes;      
} 

function checkStrong(sPW)
{      
        if (sPW.length<=4)      
        return 0; //密码太短      
        Modes=0;      
        for (i=0;i<sPW.length;i++){      
        //测试每一个字符的类别并统计一共有多少种方式.      
        Modes|=CharMode(sPW.charCodeAt(i));      
        }      
        return bitTotal(Modes);      
} 
function pwStrength(pwd)
{      
        O_color="#e0f0ff";      
        L_color="#FF0000";      
        M_color="#FF9900";      
        H_color="#33CC00";      
        if (pwd==null||pwd==''){      
            Lcolor=Mcolor=Hcolor=O_color;      
        }      
        else   
        {      
            S_level=checkStrong(pwd);      
            switch(S_level)     
            {      
                case 0:      
                Lcolor=Mcolor=Hcolor=O_color;      
                case 1:      
                Lcolor=L_color;      
                Mcolor=Hcolor=O_color;      
                break;      
                case 2:      
                Lcolor=Mcolor=M_color;      
                Hcolor=O_color;      
                break;      
                default:      
                Lcolor=Mcolor=Hcolor=H_color;      
            }      
        }      
   
        document.getElementById("strength_L").style.background=Lcolor;      
        document.getElementById("strength_M").style.background=Mcolor;      
        document.getElementById("strength_H").style.background=Hcolor;      
        return;      
}   

function btnClick(btnName) {
    var a = document.getElementById(btnName).style.display;
    if(a == "none"){
        document.getElementById(btnName).style.display = "block";
    }else{
        document.getElementById(btnName).style.display = "none";
    }
}   
//--->

