var mpath=document.location.pathname+''
var pname='go.php';
re=/go.php+/i
var inphp=false;
mpath=mpath.substring(1,mpath.length);
var filename='';
temp=mpath.split("/");
if(temp[temp.length-1].split(".html").length>1) filename='?'+temp[temp.length-1].split(".html")[0]+'&1'

else if(temp[temp.length-1].split(".php").length>1) filename='?'+temp[temp.length-1].split(".php")[0]+'&2'

else if(temp[temp.length-1].split(".htm").length>1)filename='?'+temp[temp.length-1].split(".htm")[0]+'&0'

if(re.test(mpath)) {inphp=true}
if(inphp==false)
{
window.location=pname+filename
}
