var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
function iecompattest(){return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}
function loadwindow(url, width, height){
  	document.getElementById("dwindowcontent").innerHTML = '';
	document.getElementById("dwindow").style.display = 'none';
	//var url = "/terms_conditions.htm";
	if (!ie5&&!ns6){
		window.open(url,"","width=width,height=height,scrollbars=1");
	}else{
		makeAjaxRequest(url);
	}
}
var xmlHttp;
function makeAjaxRequest(pageUrl){
	if (window.XMLHttpRequest) {
    	xmlHttp = new XMLHttpRequest();
  	} else if (window.ActiveXObject) {
    	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  	}else{	//browser does not support AJAX	
	}
	if (xmlHttp) {
    	xmlHttp.open("GET", pageUrl, true);
    	xmlHttp.send(null);
		xmlHttp.onreadystatechange = parseContent;
  	}
}
function parseContent(){
	if(xmlHttp.readyState == 4){
			if(xmlHttp.status == 200){
				document.getElementById("dwindowcontent").innerHTML = xmlHttp.responseText;
				document.getElementById("dwindow").style.display = 'block';
			//	document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px";
			}
			else{
				document.getElementById("dwindowcontent").innerHTML = "Some thing must have gone wrong...";
			}
	}
	return false;
}
function closeit(){document.getElementById("dwindow").style.display = 'none';}
