u1="/help/notice.htm#01";                            //服务条款              
u2="/help/faq.htm";                           //常见问题                
u3="/help/notice.htm#02";                          //大宗运费                      
/*积分说明*/
u4="/help/notice.htm#03";
/*支付方式*/
u5="/help/payment.htm";
/*收货注意*/
u6="/help/howto.htm#04";
/*法律法规*/
u7="/help/notice.htm#04";							
function linkEvent(num1, num2){
	var num=String(num1)+String(num2);
	if (num==11)
	{
		location.href("http://www.g2tw.com ");//返回首页
	}
	else if (num==12)
	{
		window.open("/help/aboutus.htm");//关于我们
	}
	else if (num==13)
	{
		window.open("/help/aboutus.htm#about4");//联系方式
	}
	else if (num==21)
	{
		window.open("/help/howto.htm#01");//代购流程
	}
	else if (num==22)
	{
		window.open("/help/howto.htm#02");//货物配送
	}
	else if (num==23)
	{
		window.open("/help/howto.htm#05");//代购费用
	}
	else if (num==31)
	{
		window.open("/help/service.htm#01");//商品退换原则
	}
	else if (num==32)
	{
		window.open("/help/service.htm#02");//商品退换流程
	}
	else if (num==33)
	{
		window.open("/help/service.htm#03");//退款说明
	}
}
/*Top Left4*/
u9="#";								//Added
function cscenter(){ location.href="#";} //attention
function sitemap(){ location.href="#";} //Join us


function link(){
	var url = "";
	var depth = arguments.length;
	try {
		if(depth==0) return;


		else if(depth==1) url = eval("u"+arguments[0]);
		else if(depth==2) url = eval("u"+arguments[0]+arguments[1]);
		else if(depth==3) url = eval("u"+arguments[0]+arguments[1]+arguments[2]);
		else if(depth==4) url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]);
		else if(depth==5) url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]+arguments[4]);			


		if (arguments[0]=="7" && arguments[1] =="1" && arguments[2] =="4") {
			top.location.href = "http://www.g2tw.com";
			return;
		}


		if(url=="") alert("!");
		else top.location.href = url;

	}catch(e) { alert("!"); }
}
function toHex( decimal )
{
	var hex = "";
	var tmp;
	for( ; decimal > 16; ) {
		tmp = decimal % 16;
		if( tmp > 9 ) {
			switch( tmp ) {
				case 10 : tmp = "A"; break;
				case 11 : tmp = "B"; break;
				case 12 : tmp = "C"; break;
				case 13 : tmp = "D"; break;
				case 14 : tmp = "E"; break;
				case 15 : tmp = "F"; break;
			}
		}
		hex = tmp + hex;
		decimal = parseInt( decimal / 16 );
	}
	hex = decimal + hex;

	return hex;
}
function getReturnURL( url ) {
	var ret = "";

	for( var i = 0; i < url.length; i++ ) {
		ret = ret + toHex( url.charCodeAt( i ) );
	}
	return ret;
}

