/*var storeId=10101
var catalogId=10101
var langId=-8
var hostname="https://mall.ulead.com/webapp/wcs/stores/servlet/"*/


 /* this function "redirect_url()" global redirect links for "ECPD" */
function redirect_url(pagelink) {

   var golink=pagelink

   switch (golink)
   {
     case "memberlogin" : top.location.href="http://www.ulead.com.tw/ulead/member/member.cfm?FS=TW"
      break;

      case "memberreg" : top.location.href="http://www.ulead.com.tw/ulead/member/member2005/member.cfm?FS=TW&pg=2"
      break;

      case "productreg" : top.location.href="http://www.ulead.com.tw/ulead/iflogin.cfm?fs=tw&feature=pr"
      break;

      case "uleadmall" : location.href="http://www.ulead.com.tw/store/purchoptions.htm target=_top"
      break;

      /*case "searchlink" : top.location.href=hostname+"ULSearchView?storeId="+storeId+"&catalogId="+catalogId+"&langId="+langId
      break;*/

      case "myaccount" : top.location.href="http://www.ulead.com.tw/ulead/iflogin.cfm?fs=TW"
      break;

      case "shoppingcart" : location.href="http://www.ulead.com.tw/store/purchoptions.htm target=_top"
      break;

      case "productlist" : top.location.href="http://www.ulead.com.tw/store/product_list.htm"
      break;

      case "supportform" : top.location.href="http://www.ulead.com.tw/ulead/tech/tech2002/regprodinfo.cfm?fs=TW"
      break;

   }

}


function getCookieVal (offset)
{
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
      endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}
 
function GetCookie (name)
{
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen)
      {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
         break;
      }
   return null;
}

function DeleteCookie (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}


 /* this function "showbgtable()" shows the background image fo "Top-Navigation" */
function showbgtable(){


document.write("<table width='780' border='0' cellspacing='0' cellpadding='0'>");
document.write("<tr>");
document.write("<td rowspan='2' height='73' width='124' valign='top'><a href='http://www.ulead.com.tw/'  target='_top'><img src='http://www.ulead.com.tw/images/logo.gif' width='124' height='73' border='0' alt='Back to Ulead Home'></a></td>");
document.write("<td width='161' height='55' valign='top' background='http://www.ulead.com.tw/images/my_account_bg.gif'>");
document.write("<table width='159' border='0' cellpadding='6' cellspacing='2'>");
document.write("<tr>");
document.write("<td><div align='right'><span class='welcome'>");
if (GetCookie("firstName") != null && GetCookie("lastName") != null)
{
//document.write(GetCookie("firstName"));
//document.write(" ");
//document.write(GetCookie("lastName"));
//document.write(", 您好");
}

document.write("</span></div></td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td width='495'><img src='http://www.ulead.com.tw/images/my_account.gif' width='495' height='55' border='0' usemap='#Map2'></td>");
document.write("</tr>");
document.write("<tr> ");
document.write("<td height='18' colspan='2'>&nbsp;</td>");
document.write("</tr>");
document.write("</table>");

document.write("<map name='Map2'>");
document.write("<area shape='rect' coords='64,6,118,24' href='javascript:redirect_url(\"myaccount\")' alt='我的帳號'>");
document.write("<area shape='rect' coords='131,6,183,24' href= 'http://www.ulead.com.tw/license/runme.htm' target='_top' alt='友立產品校園授權方案' title='友立產品企業授權方案'>");
document.write("<area shape='rect' coords='198,7,246,24' href='http://www.ulead.com.tw/B_license/runme.htm' target='_top' alt='友立產品企業授權方案' title='聯絡友立'>");
document.write("<area shape='rect' coords='262,7,313,24' href= 'http://www.ulead.com.tw/aboutulead/contact.htm'target='_top' alt='聯絡友立' title='友立產品校園授權方案'>");
document.write("</map>");

}
/* the function "showlayer()" and "autolayer()" control the "Ulead World Wide" Onclick-Action Button */
function showlayer(){
P7_autoLayers("dropdownLayer","closer")
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openproductlist() { //v2.0
  window.open('http://www.ulead.com.tw/store/product_list.htm','scrollbars=yes,width=307,height=400');
}
document.write("<body onunLoad='DeleteCookie'>");
