// JavaScript Document
var bnews_timeout;
var toptab_timeout;
	function ajaxFunction(type,id)
	{
		var xmlHttp;
		try {
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		 }
		catch (e)	{
		  // Internet Explorer
		  try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
		  catch (e)
			{
				try	{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				 }
				catch (e)	{
					  alert("Your browser does not support AJAX!");
					  return false;
				}
			}
		 }
		 xmlHttp.onreadystatechange=function()
   		 {
			if(xmlHttp.readyState==4)
			  {
					document.getElementById('vmarquee').innerHTML = xmlHttp.responseText;
					initializemarquee();
			  }
    	 }
		 
		 if(type=='news') {
		 	xmlHttp.open("GET","ajax_news.php",true);
		  }
		  xmlHttp.send(null);
	  }
	  
	  	
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	function fixPNG(myImage) 
	{
		if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
		{
		   var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		   var imgTitle = (myImage.title) ? 
						 "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
		   var imgStyle = "display:inline-block;" + myImage.style.cssText
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle
					  + " style=\"" + "width:" + myImage.width 
					  + "px; height:" + myImage.height 
					  + "px;" + imgStyle + ";"
					  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
		   myImage.outerHTML = strNewHTML	  
		}
	}
	
	function startList() 
	{
		if (document.all&&document.getElementById("nav")) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						//this.className+=" over";
						this.className += " over";
		 			 }
		  			node.onmouseout=function() {
		  			this.className=this.className.replace(" over", "");
		   			}
		   		}
		  }
		}
	}

function hideDiv(value) {
	document.getElementById(value).style.visibility = 'hidden';
}

function showDiv(value) {
	document.getElementById(value).style.visibility = 'visible';
}

function init() {
	fixPNG(document.pnglogo);
	fixPNG(document.pngcar);
	fixPNG(document.pnglplate);
	fixPNG(document.pngdown);
	fixPNG(document.pngup);
	startList();
	if (top.location != location) {
    top.location.href = document.location.href ;
  }
}

window.onLoad =	init();
	



