function urlw_opener(ob){	
	//urlw_thishref = ob.toString().replace(window.location,"");
	urlw_thishref = ob.toString();	
	urlw_urltarget = ob.target.toString();
	urlw_hostname = window.location.hostname.toString();
	if(urlw_urltarget == "")	{
		urlw_urltarget = "_self";
	}
	/*
	if(urlw_hostname == "mall.ufo007.com"){	
		urlw_redir1 = "portal/out/?path=";
		urlw_redir2 = "/Portal/Out/?Path=";
	}else{
		urlw_redir1 = "common/users/login/?action=";
		urlw_redir2 = "/common/users/login/?action=transfer&path=";			
	}
	*/
	switch(urlw_hostname){
		case "cn.ufo007.com":
		case "mall.ufo007.com":
		case "news.ufo007.com":
		case "fax.ufo007.com":
		case "uzone.cn.ufo007.com":
		case "usd.cn.ufo007.com":
		case "www.ufo007.com":
			urlw_redir1 = "Portal/Out/?Path=";
			urlw_redir2 = "/Portal/Out/?Path=";
			break;
		default:
			urlw_redir1 = "Common/Users/Login/?Action=";
			urlw_redir2 = "/Common/Users/Login/?Action=Transfer&Path=";
			break;
	}
	if(urlw_thishref.toLowerCase().indexOf(urlw_redir1)<0 && urlw_thishref.indexOf("http://")>=0 && urlw_thishref.toLowerCase().indexOf("http://"+urlw_hostname)<0 ){			
		urlw_thishref = "http://"+urlw_hostname+urlw_redir2+escape(urlw_thishref);		
	}
	window.open(urlw_thishref,urlw_urltarget,"",false);
	
}

function urlw_edithref(){	
	var objs = document.getElementsByTagName("A");	
	for(i = 0;i<objs.length;i++){
		if(objs[i].href != undefined){
			if(objs[i].href.toString()!="" && objs[i].href.toString().toLowerCase().replace(window.location,"").toString()!="#" ){		
				if(objs[i].href.toString().toLowerCase().indexOf("javascript")<0){			
					objs[i].onclick = new Function("urlw_opener(this);return false");            
				}
			}
		}
	}
}
if(window.attachEvent){
	window.attachEvent('onload',urlw_edithref); 	
}else{
	window.addEventListener('load', urlw_edithref, false);
} 
