// JavaScript Document
function dosearch() {
var sf=document.searchform;
var submitto = sf.sengine.value + escape(sf.searchterms.value);
window.location.href = submitto;
return false;
}


function Check_flash() {
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
	{
		for(var i=7; i>0; i--){
		flashVersion = 0;
		try{
			var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
			flashinstalled = 2;
			flashVersion = i;
			return;
		}
		catch(e){
			}
		}
		if (flashinstalled == 0)
		flashinstalled = 1;
	}
	if (flashinstalled == 1) window.location='index_noflash.html';
}


// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use

var windowtitle="Large Image"  //pop window title

function detectexist(obj){
	return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}

getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=no,scrollbars=no,toolbar=no,status=no,left='+leftpos+',top='+toppos
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
//getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
//jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth+60, popheight+70)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitle+'</title> <link rel="stylesheet" type="text/css" href="sitestyle.css" /> <body <div class="popwin"><a onclick="self.close()"><img src="'+imgpath+'"title="Click to close"><br />'+textdescription+'</div></body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}

