function getCookie(theName)
{
    theName += "=";
    theCookie = document.cookie+";";
    start = theCookie.indexOf(theName);
    if (start != -1)
    {
       end = theCookie.indexOf(";",start);
       return unescape(theCookie.substring(start+theName.length,end));
    }
    return 0;
}

//var yp = getCookie("ec2");

//if(!yp) {
      //newwin = window.open('http://buy.yahoo.com.tw/?co_servername=346274e2b6cecc08d4c0547de27c5982', 'newwin1');
      //window.focus();
      //document.cookie = "ec2=1;path=/;";
//}

