 var xmlHttp;
   function processRequest(url,val,layerid)
   {
   xmlHttp=GetXmlHttpObject();
   if (xmlHttp==null)
     {
     alert ("Your browser does not support AJAX!");
     return;
     }
	 if(val=="Aboutus")
	 {
		 document.getElementById("AboutSum").style.display="none";
		   document.getElementById("homeImage").innerHTML='<a href="#" onclick="javascript:processRequest(\'GetMyPage.php\',\'Home\',\'main\')"><img src="images/index_06.jpg" width="221" height="20" border="0" alt="" /></a>';
	 }
	 else if(val=="Home") //
	 {
		 document.getElementById("AboutSum").style.display="block";
		  document.getElementById("Event_featured").style.display="block";
	 document.getElementById("homeImage").innerHTML='<img src="images/index_06_.jpg" width="221" height="20" alt="" />';
	 }else{
		 document.getElementById("AboutSum").style.display="block";
		 document.getElementById("Event_featured").style.display="none";
		  document.getElementById("homeImage").innerHTML='<a href="#" onclick="javascript:processRequest(\'GetMyPage.php\',\'Home\',\'main\')"><img src="images/index_06.jpg" width="221" height="20" border="0" alt="" /></a>';
	 }
   var urlis = url+"?page="+val;
  // document.getElementById(layerid).style.visibility = "visible";
   document.getElementById(layerid).innerHTML="<img src='images/loading.gif' /><font color='#ffffff'>&nbsp; Please wait while Loading...</font><br><br>";
   xmlHttp.onreadystatechange=function()
     {
      if (xmlHttp.readyState==4)
       {
        document.getElementById(layerid).innerHTML=xmlHttp.responseText;
       }
     }
    xmlHttp.open("GET",urlis,true);
    xmlHttp.send(null);
  }
  var xmlHttp;
   function processERequest(url,val,layerid)
   {
   xmlHttp=GetXmlHttpObject();
   if (xmlHttp==null)
     {
     alert ("Your browser does not support AJAX!");
     return;
     }
   var urlis = url;
 //  document.getElementById(layerid).style.visibility = "visible";
   document.getElementById(layerid).innerHTML="<img src='images/loading.gif' /><font color='#ffffff'>&nbsp; Please wait while Loading...</font><br><br>";
   xmlHttp.onreadystatechange=function()
     {
      if (xmlHttp.readyState==4)
       {
        document.getElementById(layerid).innerHTML=xmlHttp.responseText;
       }
     }
   xmlHttp.open("POST",urlis,true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Content-length", val.length);
	//xmlHttp.setRequestHeader("content-disposition", val.length);
	xmlHttp.setRequestHeader("Connection", "close");
   xmlHttp.send(val);
  }
  function GetXmlHttpObject()
    {
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (err)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (err)
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      }
    return xmlHttp;
  }
 function  processSuccribe(obj,url,layer) {
    var url;
	var layer;
     var poststr = "type= "+ encodeURI( document.getElementById("type").value ) +
	 	 			"&SuscribeEmail=" + encodeURI( document.getElementById("Suscribe").value ) +
					"&microtimee= "+ encodeURI('<? echo date("h:s:m:t"); ?>');
					
     processERequest(url, poststr,layer);
   }
  function Suscribe()
  {
	  document.getElementById('Suscribe').focus();
	 
  }
  function openProto(val,curent,x,y,path)
  {
	 var win = new Window({className: "spread",  width:x, height:420, zIndex: 100, resizable: false, title: "Picture viewer", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:false, wiredDrag: false})

win.getContent().innerHTML= "<iframe width='"+x+"' height='420' scrolling='auto' src='showcase.php?shot="+val+"&curent="+curent+"&path="+path+"&x="+x+"&y="+y+"' frameborder='0' marginheight='0' marginwidth='0' ></iframe>";
//win.setStatusBar("Picture from "+val);
win.showCenter();   
          
  }
   function openPShots(val,url)
   {
	   var win = new Window({className: "spread",  width:800, height:420, zIndex: 100, resizable: false, title: "Picture viewer", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:false, wiredDrag: false})

win.getContent().innerHTML= "<iframe width='800' height='420' scrolling='auto' src='"+url+"?name="+val+"' frameborder='0' marginheight='0' marginwidth='0' ></iframe>";
//win.setStatusBar("Picture from "+val);
win.showCenter(); 
   }
   function openMap(val,curent,x,y,path)
  {
	 var win = new Window({className: "spread",  width:x, height:420, zIndex: 100, resizable: false, title: "Picture viewer", showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:false, wiredDrag: false})

win.getContent().innerHTML= "<iframe width='"+x+"' height='420' scrolling='auto' src='showcase.php?shot="+val+"&curent="+curent+"&path="+path+"&x="+x+"&y="+y+"' frameborder='0' marginheight='0' marginwidth='0' ></iframe>";
//win.setStatusBar("Picture from "+val);
win.showCenter();   
          
  }
