var currentStr = window.location.href;
if(currentStr.indexOf("warranty")<0 && currentStr.indexOf("https")>=0){
	currentStr = currentStr.replace("https","http");
	currentStr = currentStr.replace("register","www");
	window.location.href=currentStr;
}
function switchlang(from,to){
	var currentStr = window.location.href;
	currentStr = currentStr.replace("/"+from+"/","/"+to+"/");
	currentStr = currentStr.replace("lang=" + from, "lang=" + to);
	if(currentStr.indexOf("warranty")>5){
		currentStr = currentStr.replace("warrantyAction.do","index.htm");
	}
	window.location.href=currentStr;
}

function doPassVar(varName, args){
   var sendText = args.value;
   window.document.producttop.SetVariable(varName, sendText);
}
