<!-- #config src="/templates/global.js" id="javascript"# --><!-- #end config# -->
//preload
new Image().src = "../images/nav/about_on.png";
new Image().src = "../images/nav/contact_on.png";
new Image().src = "../images/nav/faq_on.png";
new Image().src = "../images/nav/gallery_on.png";
new Image().src = "../images/nav/home_on.png";

function LeftNav_onExpand(sender, eventArgs)
{
	LeftNav.render();
}

function doPostBack(event, loginbtn)
{
  if (event.keyCode == 13)
  {
    __doPostBack(loginbtn,''); 
    return false;
  }
}

function tabIt(from,to)
{
	if (from.getAttribute&&from.value.length==from.getAttribute("maxlength"))
	to.focus()
}

function ShowHideDiv(id)
{	
	var displayed = document.getElementById(id);
	if (displayed.className == '') displayed.className = 'on';
	else if (displayed.className == 'on') displayed.className = 'off';
	else displayed.className = 'on';
}


/*counter = 0;
function ShowButtonAsProcessing(btn)
{
	counter++;
	
	btn.value = "...processing";
	
	if(counter >= 1) 
	{		
		alert(counter);
		
		if(counter >= 2) 
		{ 
			alert(counter);
			btn.disabled = true;
		}	
	}
}*/

function ShowButtonAsProcessing(btn)
{
	btn.value = "...processing";	
	__doPostBack(btn.name,'');
	btn.disabled = true;
}

// Pop up a new window
function popup(url,width,height,scrollbars) 
{
	var popwidth = width;
	var popheight = height;
	var leftoffset = (screen.width - popwidth - 10)/2;
	var topoffset = (screen.height - popheight - 40)/2;
	window.open(url,'_blank','titlebar=no,resizable=no,scrollbars=' + scrollbars + ',width=' + popwidth + ',height=' + popheight + ',left=' + leftoffset + ',top=' + topoffset);
}


// Flash detection
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) 
{
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i)
	{
  if (isNaN(parseInt(words[i]))) continue;
  var MM_PluginVersion = words[i]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) 
{
	document.write('<scr' + 'ipt language=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</scr' + 'ipt\> \n');
}
