// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function P7_OpResizeFix(a) { //v1.1 by Project VII
if(!window.opera){return;}if(!document.p7oprX){
 document.p7oprY=window.innerWidth;document.p7oprX=window.innerHeight;
 document.onmousemove=P7_OpResizeFix;
 }else{if(document.p7oprX){
  var k=document.p7oprX-window.innerHeight;
  var j=document.p7oprY - window.innerWidth;
  if(k>1 || j>1 || k<-1 || j<-1){
  document.p7oprY=window.innerWidth;document.p7oprX=window.innerHeight;
  location.reload();}}}
}
P7_OpResizeFix();

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



//ajax functions
//Show Event
function showEvent(inp)
{
	xmlHttp_show_Event=GetXmlHttpObject_show_Event()
	if (xmlHttp_show_Event==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	document.getElementById("event").innerHTML= '<span class="bodytext"><img src="/images/indicator.gif" border=0> Loading....</sapn>';
	
	var url="ajax.php"
	url=url + "?section=showEvent&inp=" + inp + "&"
	url=url+"sid="+Math.random()
	//alert(url);
	xmlHttp_show_Event.onreadystatechange=stateChanged_show_Event 	
	xmlHttp_show_Event.open("GET",url,true)
	xmlHttp_show_Event.send(null)
}
function stateChanged_show_Event() 
{ 
	if (xmlHttp_show_Event.readyState==4 || xmlHttp_show_Event.readyState=="complete")
	{ 
		document.getElementById("event").innerHTML= xmlHttp_show_Event.responseText; 
	} 
	
	
} 
function GetXmlHttpObject_show_Event(handler)
{ 
	var objXMLHttp_show_Event=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp_show_Event=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp_show_Event=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp_show_Event
}


//Show Press Release
function showPress(inp)
{
    xmlHttp_show_Press=GetXmlHttpObject_show_Press()
    if (xmlHttp_show_Press==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    } 
    
    document.getElementById("press").innerHTML= '<span class="bodytext"><img src="/images/indicator.gif" border=0> Loading....</sapn>';
    
    var url="ajax.php"
    url=url + "?section=showPress&inp=" + inp + "&"
    url=url+"sid="+Math.random()
    //alert(url);
    xmlHttp_show_Press.onreadystatechange=stateChanged_show_Press 	
    xmlHttp_show_Press.open("GET",url,true)
    xmlHttp_show_Press.send(null)
}
function stateChanged_show_Press() 
{ 
    if (xmlHttp_show_Press.readyState==4 || xmlHttp_show_Press.readyState=="complete")
    { 
        document.getElementById("press").innerHTML= xmlHttp_show_Press.responseText; 
    } 
    
    
} 
function GetXmlHttpObject_show_Press(handler)
{ 
    var objXMLHttp_show_Press=null
    if (window.XMLHttpRequest)
    {
        objXMLHttp_show_Press=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        objXMLHttp_show_Press=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return objXMLHttp_show_Press
}

//show News

function showNews(inp)
{
    xmlHttp_show_News=GetXmlHttpObject_show_News()
    if (xmlHttp_show_News==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    } 
    
    document.getElementById("news").innerHTML= '<span class="bodytext"><img src="/images/indicator.gif" border=0> Loading....</sapn>';
    
    var url="ajax.php"
    url=url + "?section=showNews&inp=" + inp + "&"
    url=url+"sid="+Math.random()
    //alert(url);
    xmlHttp_show_News.onreadystatechange=stateChanged_show_News 	
    xmlHttp_show_News.open("GET",url,true)
    xmlHttp_show_News.send(null)
}
function showJob(inp){
	
    xmlHttp_show_Job=GetXmlHttpObject_show_News()
    if (xmlHttp_show_Job==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    } 
    
    document.getElementById("job").innerHTML= '<span class="bodytext"><img src="/images/indicator.gif" border=0> Loading....</sapn>';
    
    var url="ajax.php"
    url=url + "?section=showJob&inp=" + inp + "&"
    url=url+"sid="+Math.random()
    //alert(url);
    xmlHttp_show_Job.onreadystatechange=stateChanged_show_Job 	
    xmlHttp_show_Job.open("GET",url,true)
    xmlHttp_show_Job.send(null)

}
function showCompany(inp){
	
    xmlHttp_show_Company=GetXmlHttpObject_show_News()
    if (xmlHttp_show_Company==null)
    {
        alert ("Browser does not support HTTP Request")
        return
    } 
    
    document.getElementById("job").innerHTML= '<span class="bodytext"><img src="/images/indicator.gif" border=0> Loading....</sapn>';
    
    var url="ajax.php"
    url=url + "?section=showCompany&inp=" + inp + "&"
    url=url+"sid="+Math.random()
    //alert(url);
    xmlHttp_show_Company.onreadystatechange=stateChanged_show_Company 	
    xmlHttp_show_Company.open("GET",url,true)
    xmlHttp_show_Company.send(null)

}
function stateChanged_show_News() 
{ 
    if (xmlHttp_show_News.readyState==4 || xmlHttp_show_News.readyState=="complete")
    { 
        document.getElementById("news").innerHTML= xmlHttp_show_News.responseText; 
    } 
    
    
} 
function stateChanged_show_Job() 
{ 
    if (xmlHttp_show_Job.readyState==4 || xmlHttp_show_Job.readyState=="complete")
    { 
        document.getElementById("job").innerHTML= xmlHttp_show_Job.responseText; 
    } 
    
    
} 
function stateChanged_show_Company() 
{ 
    if (xmlHttp_show_Company.readyState==4 || xmlHttp_show_Company.readyState=="complete")
    { 
        document.getElementById("job").innerHTML= xmlHttp_show_Company.responseText; 
    } 
    
    
} 
function GetXmlHttpObject_show_News(handler)
{ 
    var objXMLHttp_show_News=null
    if (window.XMLHttpRequest)
    {
        objXMLHttp_show_News=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
        objXMLHttp_show_News=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return objXMLHttp_show_News
}