/*function gebi(id) {	
	var x; 
	try { 
		if(document.getElementById && !document.all){x = document.getElementById(id);}else if(document.all){x = document.all[id];}	
		if (x == null) throw "err";	
		return x;}
	catch(er){return;	}
}
*/
function gebi(id) {
      return document.getElementById(id);
}
/////////////////////////////////////
// Flash Version Detector
/////////////////////////////////////
var flashVersion = 0;
var flashVersion_DONTKNOW = -1; 
function getFlashVersion() {
   var agent = navigator.userAgent.toLowerCase();
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   // IE 5+ 
   } else if (agent.indexOf("mozilla/4") != -1 && agent.indexOf("msie") != 0) {
	  flashVersion = 1;
   }
   // NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
   else if (navigator.plugins != null && navigator.plugins.length > 0) {
      var flashPlugin = navigator.plugins['Shockwave Flash'];
      if (typeof flashPlugin == 'object') {
         if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
         else if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
		 else if (flashPlugin.description.indexOf('8.') != -1) flashVersion = 8;
         else if (flashPlugin.description.indexOf('9.') != -1) flashVersion = 9;
         else if (flashPlugin.description.indexOf('10.') != -1) flashVersion = 10;
      }
   }
   // WebTV 2.5 supports flash 3
   else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
   // older WebTV supports flash 2
   else if (agent.indexOf("webtv") != -1) flashVersion = 2;
   // Can't detect in all other cases
   else {
      flashVersion = flashVersion_DONTKNOW;
   }
   return flashVersion;
}

window.onload = function(e) {
	// movie activation
	if (!document.getElementsByTagName)
	{ 
		return; 
	} else {
		if (gebi('swf')) {
			gebi('swf').style.display = (getFlashVersion() != 0 && getFlashVersion() != -1)? 'block': 'none';
		}
	}
	// scollpane activation
	//if (gebi('content')) {
	//}
}
$(function() {
	$('#content').jScrollPane({showArrows:true, scrollbarWidth: 14, arrowSize: 10});
});

function switchDisplay(cid)
{
	if(document.getElementById(cid).style.display=='')
	{
	document.getElementById(cid).style.display='none';
	}
	else
	{
	document.getElementById(cid).style.display='';
	}
	
}

function getWidth()
{
	send = document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
	if(send<=1000)
	{	
		document.getElementById('ptvz').style.width="1000px";
	}else{
		document.getElementById('ptvz').style.width="";
	}
}

