var req;
function Initialize(){
	try{req=new ActiveXObject("Msxml2.XMLHTTP");}
	catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}
	catch(oc) {req=null;}
	}
	if(!req&&typeof XMLHttpRequest!="undefined") {
		req= new
		XMLHttpRequest();
	}
} 

function chsModel(tm_id,model_id){
	Initialize(); 
	var url="xml/modelXml.asp?id="+ tm_id +"&model_id="+ model_id +"&randomSayi="+ Math.random();
	if(req!=null){
			req.onreadystatechange=ProcesschsModel;
			req.open("GET" ,url, true);
			req.send(null);
	}
}

function ProcesschsModel(){
	if (req.readyState == 4){
			document.getElementById("modelDiv").innerHTML=unescape(req.responseText);
	}
}


var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
