var timer1;
var opacity=0;
<!--
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 clearTabs(){
try{
	var tab1=document.getElementById("tab1");
	var tab2=document.getElementById("tab2");
	var tab3=document.getElementById("tab3");
	tab1.className="tab2";
	tab2.className="tab2";
	tab3.className="tab2";
	}
catch(e){
	alert("Error on function clearTabs");
	}
}


function enableTab(tabid){
try{
	var tab=document.getElementById(tabid);
	clearTabs();
	tab.className="tab1";
	}
catch(e){
	alert("Error on function enableTab");
	}
}


function ajaxReload(obj_id,url){
 try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
     xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
    xmlhttp = false;
    }
    }
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    xmlhttp = new XMLHttpRequest();
    }

try{
	var obj=document.getElementById(obj_id);
	 xmlhttp.open("GET", url);
	 xmlhttp.onreadystatechange = function() {
	 	 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
		 	//alert(xmlhttp.responseText);
			obj.innerHTML=xmlhttp.responseText;
			//initLightbox();
			}
	 	}
	xmlhttp.send(null);	
    }
catch (e){
        alert("Error on function ajaxReload "+e.message);

        }

}



function initBanner(){
var maxWidth=document.body.offsetWidth;
var left=((maxWidth-328)/2);
var div_banner=document.getElementById("div_banner");
div_banner.style.left=left+"px";
timer1=setInterval(function() { 
	if (opacity>=99) clearInterval(timer1);
	opacity+=4;
	div_banner.style.opacity=opacity/100;
	div_banner.style.filter="alpha(opacity="+opacity+")";
	 },10);
}

function closeBanner(){
	var div_banner=document.getElementById("div_banner");
	
	div_banner.style.display="none";
	}


//-->

<!--
function latest(oid){
var element = document.getElementById('latest'); 
     try {
    request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
     request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
    request = false;
    }
    }
    if (!request && typeof XMLHttpRequest != 'undefined') {
    request = new XMLHttpRequest();
    }


var serverPage="latestnewsajax.php?oid="+oid;
request.open("GET", serverPage);
request.onreadystatechange = function() { 
	if (request.readyState == 4 && request.status == 200) { 
		element.innerHTML = request.responseText;
		} 
	}
	 
request.send(null); 
}

//-->

function show(what)
  {
    if (!document.getElementById) return null;
	activeDIV = document.getElementById(what);
	if (!activeDIV.className) {
	activeDIV.className= "hidden";

	}
	else {
    var showWhat = document.getElementById(what);
    showWhat.className = "";

	}
  }
function makeMenuRequest(options){
var xmlhttp = false;
//Check if we are using IE.
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}

try{
	var serverPage="menu/menu.php";	
	var objID="tdmenu";
	var obj = document.getElementById(objID);
	//alert(obj);
	if (options){
		serverPage+="?"+options;
		}
	//alert(serverPage);	
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
			}
		}
	xmlhttp.send(null);	
	}
catch (e){
	alert("Error on function makeMenuRequest"+e.description);
	
	}
}



function makeMenuRequest2(options){
var xmlhttp = false;
//Check if we are using IE.
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}

try{
	var serverPage="menu/menu2.php";	
	var objID="tdmenu";
	var obj = document.getElementById(objID);
	//alert(obj);
	if (options){
		serverPage+="?"+options;
		}
	//alert(serverPage);	
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
			}
		}
	xmlhttp.send(null);	
	}
catch (e){
	alert("Error on function makeMenuRequest"+e.description);
	
	}
}


function makeMenuRequest3(options){
var xmlhttp = false;
//Check if we are using IE.
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}

try{
	var serverPage="menu/menu3.php";	
	var objID="tdmenu";
	var obj = document.getElementById(objID);
	//alert(obj);
	if (options){
		serverPage+="?"+options;
		}
	//alert(serverPage);	
	xmlhttp.open("GET", serverPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
			}
		}
	xmlhttp.send(null);	
	}
catch (e){
	alert("Error on function makeMenuRequest"+e.description);
	
	}
}




function openBigPicture(id){
window.open ("common/openPicture.php?id="+id,"_blank",
"top=200,left=200,width=200,height=200,menubar=0,scrollbar=0,status=0");
}


function openBigPicture2(id,title,sess){
		window.open ("modules/gallery/openPicture2.php?id="+id+"&title="+title,"_blank",
		"top=100,left=100,width=600,height=640,menubar=0,scrollbars=0,status=0");
		}
function openBigPicture3(id,title,sess){
		window.open ("modules/gallery/openPicture3.php?id="+id+"&title="+title,"_blank",
		"top=100,left=100,width=726,height=650,menubar=0,scrollbars=1,status=0");
		}
function openBigPicture4(id,title,sess){
		window.open ("modules/gallery/openPicture4.php?id="+id+"&title="+title,"_blank",
		"top=100,left=100,width=726,height=650,menubar=0,scrollbars=1,status=0");
		}			
function openPopup(url,width,height){
window.open (url,"_blank","top=200,left=200,width="+width+",height="+height+",menubar=0,scrollbar=1,status=0");		
}

function openPopup2(url,width,height){
window.open (url,"_blank","top=200,left=200,width="+width+",height="+height+",menubar=0,scrollbars=yes,status=0");		
}

function openPlayer(url,w,h){
//var w=200;
//var h=200;
window.open(url,"_blank","height="+h+",width="+w+",left=150,top=150,menubar=no,status=no,scrollbars=no,resizable=no");
	
}	