﻿function SetKeyword(o){if(o.value=='Search')o.value='';}
if (top.location != location) {
top.location.href=location.href;
window.open(location.href);
}
function ddchk(){
if(document.form.keyword.value==""||document.form.keyword.value=="Search"){
document.form.keyword.value="Search";
return false
}

}

var jschars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
function generateMixed(n) {
    var res = "";
    for(var i = 0; i < n ; i ++) {
        var sjid = Math.ceil(Math.random()*35);
        res += jschars[sjid];
    }

    return res;

} 

function SetCookie()
{
    var cozhi = generateMixed(7);
    var Days = 7
   name='procardid';
    var exp = new Date();  
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name+ "="+ escape (cozhi) + ";expires=" + exp.toGMTString();

}
function getCookies(name)
{
　　 var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
　　 if(arr != null) return unescape(arr[2]); return null;
}
function myCookie(){
	
if(getCookies('procardid')=="null"||getCookies('procardid')==null)
 {

SetCookie();

}

}
window.onload =myCookie
