// JavaScript Document

function InitAjax()
{
 var ajax=false; 
 try { 
  ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
 } catch (e) { 
  try { 
   ajax = new ActiveXObject("Microsoft.XMLHTTP"); 
  } catch (E) { 
   ajax = false; 
  } 
 }
 if (!ajax && typeof XMLHttpRequest!='undefined') { 
  ajax = new XMLHttpRequest(); 
 } 
 return ajax;
}

function shows(layerid,pathname,str,s){
if(s=="11"){
window.document.body.background="";
window.document.body.bgColor="#ffffff";
	window.document.body.style.filter ="Alpha(Opacity=50)";
	//document.getElementById("Layer1").style.display="block";


	var loadstr="<div align=center><object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 width=80 height=20>   <param name=movie value=images/loading.swf /><param name=quality value=high /><embed src=images/loading.swf quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=80 height=20></embed></object></div>";
	
document.getElementById("ll").innerHTML=loadstr;
}
	var url = pathname;
	 if(s=="1"){
		url="indexa.php"; 
	 }
    var postStr = str;
 	var ajax = InitAjax();   
	//alert(str);
    ajax.open("POST", url, true);   
    ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');
    ajax.send(postStr);
    ajax.onreadystatechange = function() { 
   if (ajax.readyState == 4 && ajax.status == 200) {
	   
  if(s=="1"){
//document.getElementById(layerid).innerHTML ="<iframe width=950 height=380 scrolling=no frameborder=0 src="+ url + "></iframe>";
	     document.getElementById(layerid).innerHTML = ajax.responseText;
  }else{
	     document.getElementById(layerid).innerHTML = ajax.responseText;

  }
  setTimeout(re1,'2000');
   }
  
 } 	
}

function re(){
	//window.document.body.bgColor="#333333";
	//window.document.body.style.filter ="Alpha(Opacity=50)";
}
function re1(){
	//window.document.body.background="images/B.jpg";
  // window.document.body.bgColor="#ffffff";
 //  window.document.body.style.filter ="Alpha(Opacity=100)";
  // document.getElementById("ll").innerHTML="";

}
function cimg(divid,pathname,w,h){
	
	document.getElementById(divid).innerHTML="<img src=" + pathname + " width=" + w + "px height=" + h + "px >";	
	
}

