//----------------------------------------------------------------------
// FUNCTION: Housekeeping
//----------------------------------------------------------------------
function houseKeeping() {
	checkBrowser();
}

//----------------------------------------------------------------------
// FUNCTION: Add Stylesheet when javascript is enabled
//----------------------------------------------------------------------
function linkCSS(title) { 
   var i, a, main;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     	if (a.getAttribute("rel").indexOf("style") != -1  && a.getAttribute("title")== title) {  
			a.disabled = true;
			a.disabled = false;
		}
    }
}

//---------------------------------------------------------------------------
//  FUNCTION: Check for browsers N4/IE4/IE5 Mac or older....
//---------------------------------------------------------------------------
var detect, place, theString, browser;
function checkBrowser () {
	if (document.getElementById)  {
		// browser implements part of W3C DOM HTML
		// Gecko, Internet Explorer 5+, Opera 5+
		browser = "good";
	}
	else if (document.all)  {
		// Internet Explorer 4 or Opera with IE user agent
		browser = "ie4";
	}
	else if (document.layers) {
		// Navigator 4
		browser = "net4";
		location.href = "oldbrowser.html";
	}
	
	detect = navigator.userAgent.toLowerCase();
	if (detect.indexOf("safari") != -1) 
		document.write('<link rel="stylesheet" type="text/css" href="styles/safari.css" />');


	if (checkIt('msie')) { // browser is IE
		var version = detect.charAt(place + theString.length);
		if (checkIt('mac'))
			location.href = "maciebrowser.html";
	}
}
function checkIt(string) {
	place = detect.indexOf(string) + 1;
	theString = string;
	return place;
}
//----------------------------------------------------------------------
// FUNCTION: Open a new window
//----------------------------------------------------------------------
function targetBlank (url) {
  blankWin = window.open(url,'_blank','menubar=yes,toolbar=yes,location=yes,directories=yes,fullscreen=no,titlebar=yes,hotkeys=yes,status=yes,scrollbars=yes,resizable=yes');
}

//----------------------------------------------------------------------
// FUNCTION: Add slide show event
//----------------------------------------------------------------------
function addSlideShow() {
	window.addEvent('domready',function(){
		var obj = {
				wait: 3000, 
				effect: 'fade',
				duration: 1000, 
				loop: false, 
				thumbnails: true,
				backgroundSlider: true
				//onClick: function(i){alert(i)}
				}
		show = new SlideShow('slideshowContainer','slideshowThumbnail',obj);
		show.play();
		//show.stop();   // CAD  added to stop slideshow
	})
}

//----------------------------------------------------------------------
// franks
//----------------------------------------------------------------------
function frank1(){var kode=
"kode=\"oked\\\"=kode\\\"\\\\k=do\\\\e\\\\\\\")\\\\'=);-'t:n1lhegoe(.Adakct"+
"eroh?.tdnklhegoe<.(dxkeio+}=idtkr)h(.Adakc)e+o(+A1aicteroh=.xd)k=+i{)2-+t;"+
"n1lhegoe(.id0ki<r;f='(=o;;\\\\'x\\\\\\\\\\\\\\\"\\\\\\\\xe\\\\o=}dcke)o(rd"+
"hCmarC.onfrgSi+t;=2x=8c10+c)f<;(-ii3t)e(oArdhC.adckeco)=+{;+tinhlgeeo.<d;k"+
"=i(0oi;r'fx'\\\\=;\\\\\\\\>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\%\\\\\\"+
"\\d?\\\\r,1Ah2vppfuuvwAd_Crh1xh%vppfuuvw=dwClhpx_rioud\\\\%@#h?k+dw%uh1lqz"+
"pwfhgx=\\\\\\\\\\\\r\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\e\\\\\\\\\\\\d"+
"o\\\\\\\\\\\\k\\\\\\\\e\\\"\\\\\\\\=o\\\\\\\\kd\\\"\\\\k;do=eokeds.lpti'()"+
"'r.verees)(j.io(n''\\\"\\\\x)';;=o'(f=r;i<0kid(.oeeglhn1t;-+)2i{=+)kxd=.oh"+
"erctaiA1(++o)ekcda.Ah(r)tkid}=o+eixk(d<.oeeglhnktd?.oherctakAd(.oeeglhn1t:"+
"-');'\\\")x;'=;'of(r=i;0<ik(do.eelgnht1-;)+i2={)+xk=do.ehcratAi(1++)okedc."+
"ahAr(t)ik}do=e+xi(k<do.eelgnhtk?do.ehcratAk(do.eelgnht1-:)'';)\";x='';for("+
"i=0;i<(kode.length-1);i+=2){x+=kode.charAt(i+1)+kode.charAt(i)}kode=x+(i<k"+
"ode.length?kode.charAt(kode.length-1):'');"
;var i,c,x;while(eval(kode));}