
var thisScript = (function(){
    var ScriptID = "ScriptID" + Math.round(100000*Math.random());
    document.write("<script id='"+ScriptID+"'></script>");
    return document.getElementById
(ScriptID).previousSibling.getAttribute("src");
})()



	var http = false;

	if(navigator.appName == "Microsoft Internet Explorer") {
  	http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
  	http = new XMLHttpRequest();
	} 

	function replace() {

		var u = document.location.href;
		var slash = '/'; 
		if (u.match(/\\/)) { 
			slash = '\\' 
			} 
		var fName = u.substring(u.lastIndexOf(slash) + 1, u.lastIndexOf('.')); 

		//alert(fName) ;

		if (fName.match('.125')) { 
			fName = 'index' 
			} 
		if (fName.match('.com')) { 
			fName = 'index' 
			}

		var dirs=window.location.href.split('/'),
		cdir=dirs[dirs.length-2];

		//alert(cdir);
		
		var scr = "../cms_get.asp"
		
		if (thisScript=="cms.js"){
		    scr="cms_get.asp";
		    cdir="Home"
		    }

		//if (cdir=="88.208.231.125"){
		    //scr="cms_get.asp";
		    //cdir="Home"
		    //}
		    

  		http.open("GET", scr+"?fr="+cdir+"&fn="+fName, true);
  		http.onreadystatechange=function() {
    		if(http.readyState == 4) {
    		    if(http.responseText != ''){
      			document.getElementById('content-left').innerHTML = http.responseText;
    		    //document.getElementById('content-left').innerHTML = "Error: "+fName+" / "+cdir;      			
    		    }else{
    		    document.getElementById('content-left').innerHTML = "Error: "+fName+" / "+cdir;
    		    }
    		 }
  		}

  		http.send(null);
		}

replace();
