﻿function exAddFavorite(sTitle)
{
   var t=document.title;
   var sURL = document.location.href;
   if(document.all)
   {
      window.external.AddFavorite(sURL,sTitle + " - " + t);}
   else
   {
      window.sidebar.addPanel(sTitle, sURL, "");
   }
}

function Language(hostname)
{
   var thisUrl = window.location.href;
   var FileName = thisUrl.split(".com")[1];
   window.location.href = "http://"+hostname+".goldicq.com"+FileName;
}

function openwindow(flg)
{
    if(document.getElementById("open"+flg).style.display=="none")
    {
        document.getElementById("open"+flg).style.display="";
    }
    else
    {
        document.getElementById("open"+flg).style.display="none";
    }
}

function checksc()
{
   var Pnum = parseInt(GetSC('GoodsNum')) + parseInt(GetSC('PowerNum'));
   if(Pnum == 0 || isNaN(Pnum))
   {
	   document.write('<img src="/files0/topcart1.gif" border="0" />');		   
   }
   else
   {
	   document.write('<div class="paddingleft30">')
	   document.write('<div class="margintopbot5"><a href="http://www.goldicq.com/shoppingcart.html" class="style10"><u>' + Pnum + ' product(s) in shopping cart</u></a></div>')
	   document.write('<div align="right"><span class="style10">Total: ' + GetSC('PaymentPrice').replace('+',' ') + '</span></div>')
	   document.write('</div>')
   }
}

function GetSC(sName)
{
	var arr = document.cookie.match(new RegExp("(^| )"+sName+"=([^;]*)(;|$)"));
	if(arr !=null){return unescape(arr[2])};
	return null;
}

function fChange(objid,fn)
{
   document.getElementById(objid).src="commonunit/"+fn+".asp?"+Math.random();
}
