// JavaScript Document




// Browser Detect Lite  v2.1.3
// http://www.dithered.com/javascript/browser_detect/index.html
// modified by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)


function BrowserDetectLite() {
	var ua = navigator.userAgent.toLowerCase(); 

	// browser name
	this.isGecko     = (ua.indexOf('gecko') != -1);
	this.isMozilla   = (this.isGecko && ua.indexOf("gecko/") + 14 == ua.length);
	this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.isIE        = ( (ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1) ); 
	this.isOpera     = (ua.indexOf("opera") != -1); 
	this.isKonqueror = (ua.indexOf("konqueror") != -1); 
	this.isIcab      = (ua.indexOf("icab") != -1); 
	this.isAol       = (ua.indexOf("aol") != -1); 
	this.isWebtv     = (ua.indexOf("webtv") != -1); 
	
	// spoofing and compatible browsers
	this.isIECompatible = ( (ua.indexOf("msie") != -1) && !this.isIE);
	this.isNSCompatible = ( (ua.indexOf("mozilla") != -1) && !this.isNS && !this.isMozilla);
	
	// browser version
	this.versionMinor = parseFloat(navigator.appVersion); 
	
	// correct version number
	if (this.isNS && this.isGecko) {
		this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
	}
	else if (this.isIE && this.versionMinor >= 4) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	}
	else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isOpera) {
		if (ua.indexOf('opera/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
		}
	}
	else if (this.isKonqueror) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
	}
	else if (this.isIcab) {
		if (ua.indexOf('icab/') != -1) {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
		}
		else {
			this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
		}
	}
	else if (this.isWebtv) {
		this.versionMinor = parseFloat( ua.substring( ua.indexOf('webtv/') + 6 ) );
	}
	
	this.versionMajor = parseInt(this.versionMinor); 
	this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	
	// dom support
   this.isDOM1 = (document.getElementById);
	this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

	// platform
	this.isWin   = (ua.indexOf('win') != -1);
	this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
	this.isMac   = (ua.indexOf('mac') != -1);
	this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('linux') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
	
	// specific browser shortcuts
	this.isNS4x = (this.isNS && this.versionMajor == 4);
	this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
	this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
	this.isNS4up = (this.isNS && this.versionMinor >= 4);
	this.isNS6x = (this.isNS && this.versionMajor == 6);
	this.isNS61x = (this.isNS6x && this.versionMinor <= 6.1);
	this.isNS6up = (this.isNS6x && this.versionMajor > 6.1);
	this.isNS7x = (this.isNS && this.versionMajor == 7);
	this.isNS7up = (this.isNS && this.versionMajor >= 7);

	this.isMOZ1up = (this.isMozilla && this.versionMajor >= 1);
	this.isIE4x = (this.isIE && this.versionMajor == 4);
	this.isIE4up = (this.isIE && this.versionMajor >= 4);
	this.isIE5x = (this.isIE && this.versionMajor == 5);
	this.isIE55 = (this.isIE && this.versionMinor == 5.5);
	this.isIE5up = (this.isIE && this.versionMajor >= 5);
	this.isIE6x = (this.isIE && this.versionMajor == 6);
	this.isIE6up = (this.isIE && this.versionMajor >= 6);
	
	this.isIE4xMac = (this.isIE4x && this.isMac);
}

var browser;
browser = new BrowserDetectLite();



function getAbsY(elm) {
	if (elm.y) return elm.y;
	
	pos = 0;

	while (elm != null) {
		pos += elm["offsetTop"];
		elm = elm.offsetParent;
	}

	return pos;
}


function getAbsYPos(elm) {
	var temppos;

	if (browser.isIE) {
		temppos = getAbsY(document.all[elm]);
	} else if (document.layers) {
		temppos = getAbsY(document.anchors[elm]);
	} else {
		temppos = getAbsY(document.getElementById(elm));
	}

	return temppos;
}
/*
// for old widget
function moveEnhanced() {
	var topenhanced = 0;
	topenhanced = getAbsYPos('endreserve');

	sY(gE('enhanced'), 0);
	sY(gE('enhanced'), topenhanced + 13);
}
*/

//for new widget
var pageHasSpecial = false;

function moveEnhanced() {

	var topenhanced = getAbsYPos('endreserve');
	var toptabs = getAbsYPos('startreserve');
 	
	sY(gE('enhanced'), topenhanced + 13);
	sY(gE('packagefinder'), toptabs - 30);

}

 function showEnhanced() {
 	if ((browser.isIE)&&(pageHasSpecial)) {
 		hE(gE('special'));
 	}
 	sE(gE('enhanced'));
 }
 
 function hideEnhanced() {
 	if ((browser.isIE)&&(pageHasSpecial)) {
 		sE(gE('special'));
	}
 	hE(gE('enhanced'));
 }
 


 function showPackage() {
	moveEnhanced();	
	hE(gE('checkavail')); 
	hideEnhanced(); 
	sE(gE('packagefinder'));

 }
 



if (document.layers){
          originalWindowWidth = innerWidth;
          originalWindowHeight = innerHeight;
          onresize=function() { if(innerWidth != originalWindowWidth || innerHeight != originalWindowHeight) location.reload() };
}

if (browser.isWin && browser.isNS4x) {
//windows NS fixes
			document.tags.body.fontSize = '12px';
			document.tags.td.fontSize = '12px';
			document.tags.p.fontSize = '12px';
			document.tags.input.fontSize = '10px';
			document.tags.textarea.fontSize = '10px';

			document.classes.fontsmall.all.fontSize = '11px';
			document.classes.fontlogin.all.fontSize = '11px';
			document.classes.fontnav.all.fontSize = '11px';
			document.classes.fontnavtitle.all.fontSize = '11px';
			document.classes.maintitleline1.all.fontSize = '19px';
			document.classes.maintitleline2.all.fontSize = '19px';
			document.classes.reservetitleline1.all.fontSize = '19px';
			document.classes.reservetitleline2.all.fontSize = '19px';
			document.classes.featuretitle.all.fontSize = '11px';
			document.classes.subheading.all.fontSize = '11px';
			document.classes.promotitle.all.fontSize = '15px';
			document.classes.sidenavhdrcap.all.fontSize = '17px';
			document.classes.sidenavhdr.all.fontSize = '13px';
			document.classes.pageheadingcap.all.fontSize = '23px';
			document.classes.pageheading.all.fontSize = '19px';
}


var rolloverImageOff = new Array();
var rolloverImageOn = new Array();
var rolloverCurrent = '';
// Preload rollover images
function rolloverInit() {
	if (document.images) {
		
		// for each rollover, preload both states and put filename in an associative array
		for (var i = 0; i < rolloverImageOnFiles.length; i++) {
			rolloverCurrentName = rolloverImageTagNames[i];
			rolloverImageOff[rolloverCurrentName] = new Image();
			rolloverImageOn[rolloverCurrentName] = new Image();
			rolloverImageOff[rolloverCurrentName].src = rolloverImageDirectory + rolloverImageOffFiles[i];
			rolloverImageOn[rolloverCurrentName].src = rolloverImageDirectory + rolloverImageOnFiles[i];
		}
	}
}
// On state activation
function rolloverOn(img, layer) {
	if (document.images && rolloverImageOn[img]) {
		
		// rollovers in layers in NS4 require a different image reference
		if (layer != null && document.layers) {
			if (typeof(layer) == 'object') layer.document.images[img].src = rolloverImageOn[img].src;
			else if (typeof(layer) == 'string') eval('document.layers["' + layer + '"].document.images[img].src = rolloverImageOn[img].src');
		}
		
		// non-layer rollovers in NS4 and all rollovers in other browsers
		else if (document.images[img]) document.images[img].src = rolloverImageOn[img].src;
	}
}
// Off state activation
function rolloverOff(img, layer) {
	if (document.images && rolloverImageOff[img]) {

		// rollovers in layers in NS4 require a different image reference
		if (layer != null && document.layers) {
			if (typeof(layer) == 'object') layer.document.images[img].src = rolloverImageOff[img].src;
			else if (typeof(layer) == 'string') eval('document.layers["' + layer + '"].document.images[img].src = rolloverImageOff[img].src');
		}
		
		// non-layer rollovers in NS4 and all rollovers in other browsers
		else if (document.images[img]) document.images[img].src = rolloverImageOff[img].src;
	}
}

// Rollover with state function (not used in standard rollovers; included for flexability)
function rolloverSetCurrent(img) {
	if (rolloverCurrent) rolloverOff(rolloverCurrent);
	rolloverCurrent = img;
	rolloverOn(rolloverCurrent);
}
//sub nav rollover
var subnavRolloverImageOn = new Array();
var subnavRolloverImageOff = new Array();
var subnavRolloverCurrent = '';
// Preload rollover images
function subnavRolloverInit() {
	if (document.images) {
	
			// for each rollover, preload both states and put filename in an associative array
			for (var i = 0; i < subnavRolloverImageOnFiles.length; i++) {
				subnavRolloverCurrentName = subnavRolloverImageTagNames[i];

				subnavRolloverImageOff[subnavRolloverCurrentName] = new Image();
				subnavRolloverImageOn[subnavRolloverCurrentName] = new Image();
				subnavRolloverImageOff[subnavRolloverCurrentName].src = subnavRolloverImageDirectory + subnavRolloverImageOffFiles[i];
				subnavRolloverImageOn[subnavRolloverCurrentName].src = subnavRolloverImageDirectory + subnavRolloverImageOnFiles[i];
			}
		}
}
// On state activation
function subnavRolloverOn(img) {

	if (document.images && subnavRolloverImageOn[img]) {
		if (document.images[img]) document.images[img].src = subnavRolloverImageOn[img].src;
	}
}
// Off state activation
function subnavRolloverOff(img) {
	if (document.images && subnavRolloverImageOff[img]) {
	   if (document.images[img]) {
	   		if (img != subnavRolloverCurrent) {
		   document.images[img].src = subnavRolloverImageOff[img].src;
	   		}
	   }
	}
}
function subnavRolloverSetCurrent(img) {
	if (subnavRolloverCurrent) subnavRolloverOff(subnavRolloverCurrent);
	subnavRolloverCurrent = img;
	subnavRolloverOn(subnavRolloverCurrent);
}

// 1k DHTML API - standards version
 var d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;px='px';
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
function sZ(e,z){l?e.zIndex=z:e.style.zIndex=z;}
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x+px;}
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y+px;}

function sW(e,w){l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w+px;}
function sH(e,h){l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h+px;}
function sC(e,t,r,b,x){l?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+px+' '+r+px+' '+b+px+' '+x+px+')';}
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}

function gX(e){if(l)x=e.left;else if(op)x=e.style.pixelLeft;else x=e.style.left;return parseInt(x);}
function gY(e){if(l)y=e.top;else if(op)y=e.style.pixelTop;else y=e.style.top;return parseInt(y)}
function gW(e){return((l)?e.clip.width:parseInt(e.style.width));}
function gH(e){return((l)?e.clip.height:parseInt(e.style.height));}




// Window opener functions  v1.0.6
// http://www.dithered.com/javascript/window/index.html
// code by Chris Nott (chris[at]dithered[dot]com)

//	Popup Window openers

var winReference = null;

// Open a window at a given position on the screen
function openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName) {
	
	// ie 4.5 and 5.0 mac - windows are 2 pixels too short; if a statusbar is used, the window will be an additional 15 pixels short
	var agent = navigator.userAgent.toLowerCase();
	if (agent.indexOf("mac") != -1 && agent.indexOf("msie") != -1 && (agent.indexOf("msie 4") != -1 || agent.indexOf("msie 5.0") != -1) ) {
		height += (status) ? 17 : 2;
	}

	// Adjust width if scrollbars are used (pc places scrollbars inside the content area; mac outside) 
	width += (scrollbars != '' && scrollbars != null && agent.indexOf("mac") == -1) ? 16 : 0;

	var properties = 'width=' + width + ',height=' + height + ',screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y + ((status) ? ',status' : '') + ',scrollbars' + ((scrollbars) ? '' : '=no') + ((moreProperties) ? ',' + moreProperties : '');
	var reference = openWindow(url, name, properties, openerName);
	
	// resize window in ie if we can resize in ns; very messy
	// commented out because openPositionedWindow() doesn't set the resizable attribute
	// left in for reference
	/*if (resizable && agent.indexOf("msie") != -1) {
		if (agent.indexOf("mac") != -1) {
			height += (status) ? 15 : 2;
			if (parseFloat(navigator.appVersion) > 5) width -= 11;
		}
		else {
			height += (status) ? 49 : 31;
			width += 13;
		}
		setTimeout('if (reference != null && !reference.closed) reference.resizeTo(' + width + ',' + height + ');', 150);
	}*/

	return reference;
}

// Open a window at the center of the screen
function openCenteredWindow(url, name, width, height, status, scrollbars, moreProperties, openerName) {
	var x, y = 0;
	if (screen) {
      x = (screen.availWidth - width) / 2;
	   y = (screen.availHeight - height) / 2;
   }
	if (!status) status = '';
	if (!openerName) openerName = '';
	var reference = openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName);
	return reference;
}	

// Open a window at the center of the parent window
function openCenteredOnOpenerWindow(url, name, width, height, status, scrollbars, moreProperties, openerName) {
	var centerX = 0;
   var centerY = 0;
   if (window.screenX != null && window.outerWidth) {
      centerX = window.screenX + (window.outerWidth / 2);
      centerY = window.screenY + (window.outerHeight / 2);
   }
   else if (window.screenLeft) {
      if (document.documentElement) {
         centerX = window.screenLeft + (document.documentElement.offsetWidth / 2);
         centerY = window.screenTop + (document.documentElement.offsetHeight / 2);
      }
      else if (document.body && document.body.offsetWidth) {
         centerX = window.screenLeft + (document.body.offsetWidth / 2);
         centerY = window.screenTop + (document.body.offsetHeight / 2);
      }
   }
   
   if (centerX == 0) {
      openCenteredWindow(url, name, width, height, status, scrollbars, moreProperties, openerName);
   }
   var x = parseInt(centerX - (width / 2));
   var y = parseInt(centerY - (height / 2));
	if (!status) status = '';
	if (!openerName) openerName = '';
	var reference = openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName);
	return reference;
}	

// Open a full-screen window (different from IE's fullscreen option)
function openMaxedWindow(url, name, scrollbars, openerName) {
	var x, y = 0;
	var width  = 600;
	var height = 800;
	if (screen) {
      if (screen.availLeft) {
         x = screen.availLeft;
         y = screen.availTop;
      }
      width  = screen.availWidth - 6;
	   height = screen.availHeight - 29;
   }
	var reference = openPositionedWindow(url, name, width, height, x, y, false, scrollbars, openerName);
	return reference;
}

// Open a full-chrome (all GUI elements) window
// This is like using a target="_blank" in a normal link but allows focussing the window
function openFullChromeWindow(url, name, openerName) {
	return openWindow(url, name, 'directories,location,menubar,resizable,scrollbars,status,toolbar');
}

// Open a sized full-chrome (all GUI elements) window 
function openSizedFullChromeWindow(url, name, width, height, moreProperties, openerName) {
	return openCenteredWindow(url, name, width, height, true, true, 'menubar,toolbar', openerName)
}

// Core utility function that actually creates the window and gives focus to it
function openWindow(url, name, properties, openerName) {

	// ie4.x pc can't give focus to windows containing documents from a different domain
	// in this case, initially load a local interstisial page to allow focussing before loading final url
	var agent = navigator.userAgent.toLowerCase();
	if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) == 4 && agent.indexOf("msie 5") == -1 && agent.indexOf("msie5") == -1 && agent.indexOf("win") != -1 && url.indexOf('http://') == 0) {
		winReference = window.open('about:blank', name, properties);
		
		setTimeout('if (winReference && !winReference.closed) winReference.location.replace("' + url + '")', 300);
	}
	else {
		winReference = window.open(url, name, properties);
	}

	// ie doesn't like giving focus immediately (to new window in 4.5 on mac; to existing ones in 5 on pc)
	setTimeout('if (winReference && !winReference.closed) winReference.focus()', 200);
	
	if (openerName) self.name = openerName;
	return winReference;
}

//	Modal Dialog controls

// Close a dialog
// Call from onunload event handler of any page that can create a dialog
function closeDialog(dialog) {
	if (dialog && dialog.closed != true) dialog.close();
}

// Close parent popup
// Call from onload event handler of any page that could be created from a dialog
function closeParentDialog() {
	if (top.opener && isWindowPopup(top.opener)) {
		root = top.opener.top.opener;
		top.opener.close();
		top.opener = root;
	}
}

// Check if a window is a popup
function isWindowPopup(win) {
	return ((win.opener) ? true : false);
}


var navOver = new Array();
var hidenavinterval;
var timeout_period = 500;
var initialized = true;
 
// This function initializes all of the nav arrays.
// It also moves the nav layers to the correct position relative to 'navtop'.
function init() {
	for (var i = 0; i < navLayers.length; i++) {
		navOver[navLayers[i]] = false;
	}
}

// Shows the nav menu referenced by 'nav'. It also hides all subnavs and subsubnavs.
function showNav(nav) {
	if (!initialized) return;
	
	clearTimeout(hidenavinterval);

	resetNavBg();

	hideNavExcept(nav);
	hideSubNavExcept('');
	hideSubSubNavExcept('');
	showSelectBoxes();

	sE(gE(nav));
	resetNavCheck(nav);
}

// Shows the subnav menu referenced by 'subnav'. It also hides all subsubnavs.
function showSubnav(subnav) {
	clearTimeout(hidenavinterval);
	
	resetSubNavBg();

	hideSubNavExcept(subnav);
	hideSubSubNavExcept('');

	sE(gE(subnav));
	showSelectBoxes();
	hideSelectBoxes(gE(subnav));
}

// Shows the subsubnav menu referenced by 'subsubnav'
function showSubSubnav(subsubnav) {
	clearTimeout(hidenavinterval);
	
	resetSubSubNavBg();

	hideSubSubNavExcept(subsubnav);
	
	sE(gE(subsubnav));
}

// Hides the nav menu referenced by 'nav' and hides all subnavs and subsubnavs
function hideNav(nav) {
	hE(gE(nav));

	rolloverOff(nav+'img');
}

// Hides all navs, subnavs and subsubnavs
function hideAll() {
	if (!initialized) return;

	hideNavExcept('');
	hideSubNavExcept('');
	//alert('okdd');
	hideSubSubNavExcept('');
	
	showSelectBoxes();
	
}

// Calls hideNav or all navs except the one referenced by 'nav'. If nav == '' it hides all navs.
function hideNavExcept(nav) {
	for (i = 0; i < navLayers.length; i++) {
		if (nav != navLayers[i]) {
			hideNav(navLayers[i]);
		}
	}
}

// Hides all subnavs except the one referenced by 'subnav'. If subnav == '' it hides all subnavs.
function hideSubNavExcept(subnav) {
	for (j = 0; j < subnavLayers.length; j++) {
		if (subnav != subnavLayers[j]) {
			hE(gE(subnavLayers[j]));
		}
	}
}

// Hides all subsubnavs except the one referenced by 'subsubnav'. If subsubnav == '' it hides all subsubnavs.
function hideSubSubNavExcept(subsubnav) {
	for (k = 0; k < subsubnavLayers.length; k++) {
		if (subsubnav != subsubnavLayers[k]) {
			hE(gE(subsubnavLayers[k]));
		}
	}
}

// Sets the timeout to check whether to close the nav or not
function startHideNav(nav) {
	navOver[nav] = false;
	hidenavinterval = setTimeout('checkNav(\"'+nav+'\")', timeout_period);
}

// Resets the variable used to check whether or not to close the nav
function resetNavCheck(nav) {
	clearTimeout(hidenavinterval);
	navOver[nav] = true;
}

// Checks whether it should close the nav. If the navOver[nav] still equals false, then it closes the nav.
function checkNav(nav) {
	if (navOver[nav] == false) {
		hideNav(nav);
		hideSubNavExcept('');
		hideSubSubNavExcept('');
		showSelectBoxes();
	}
}


// Hides any select boxes that are under the nav item referenced by navmenu
function hideSelectBoxes(navmenu)
{
	if (browser.isIE5up) {
	
		for (var i=0; i < document.all.tags("SELECT").length; i++) {
			obj = document.all.tags("SELECT")[i];

			if (! obj || ! obj.offsetParent) continue;
	
			objx = obj.offsetLeft;
			objy = obj.offsetTop;
			objParent = obj.offsetParent;

			while (objParent != null) {
				objx += objParent.offsetLeft;
				objy += objParent.offsetTop;
				objParent = objParent.offsetParent;
			}

			if (!((gX(navmenu) > (objx + obj.offsetWidth) || objx > (gX(navmenu) + navmenu.offsetWidth))||(objy > gY(navmenu) + navmenu.offsetHeight))) {
				obj.style.visibility = "hidden";
			}
		}
	}
}

// Shows any hidden select boxes
function showSelectBoxes() {
	if (browser.isIE5up) {
		for (i = 0; i < document.all.tags("SELECT").length; i++) {
			obj = document.all.tags("SELECT")[i];
			if (obj && obj.style.visibility=="hidden") obj.style.visibility = "";
		}
	}
}




///BG ROLLOVERS///

// BG rollover colours for the main nav and the secondary nav
var mainnavonColor = "#B3C4AD";
var mainnavoffColor = "#909E8B";
var mainaltnavonColor = "#B3C4AD";
var mainaltnavoffColor = "#7D7D7D";
var subnavonColor = "#999977";
var subnavoffColor = "#C3C4AD";
var subsubnavonColor = "#909E8B";
var subsubnavoffColor = "#B3C4AD";
var secnavonColor = "#666655";
var secnavoffColor = "#C3C4AD";

var lastanch = "";
var lastsec = "";
var lastsubanch = "";
var lastsubsec = "";
var lastsubsubanch = "";
var lastsubsubsec = "";

// Calls the function to change the bg color and stores the last nav rolled over
function bgrolloverOnNav(anch,sec) {
	bgrolloverOn(anch,sec);
	if (anch != lastanch) {
		resetNavBg();
		lastanch = anch;
		lastsec = sec;
	}
}

// Calls the function to change the bg color and stores the last subnav rolled over
function bgrolloverOnSubNav(anch,sec) {
	bgrolloverOn(anch,sec);
	if (anch != lastsubanch) {
		resetSubNavBg();
		lastsubanch = anch;
		lastsubsec = sec;
	}
}

// Calls the function to change the bg color and stores the last subsubnav rolled over
function bgrolloverOnSubSubNav(anch,sec) {
	bgrolloverOn(anch,sec);
	if (anch != lastsubsubanch) {
		resetSubSubNavBg();
		lastsubsubanch = anch;
		lastsubsubsec = sec;
	}
}

// Changes the bg color of the table cell holding the anchor 'anch'
function bgrolloverOn(anch,sec) {
	if ((browser.isIE)||(browser.isMOZ1up)||(browser.isNS6up) ||(browser.isNS6x) || (browser.isNS61x) || (browser.isNS) ) anch.style.backgroundColor =  eval(sec+"onColor");
}

// Changes the bg color of the table cell holding the anchor 'anch'
function bgrolloverOff(anch, sec) {
	if ((browser.isIE)||(browser.isMOZ1up)||(browser.isNS6up) ||(browser.isNS6x) || (browser.isNS61x) || (browser.isNS)) anch.style.backgroundColor =  eval(sec+"offColor");
}

// Resets the last nav anchor rolled over
function resetNavBg() {
	if (lastanch != "") {
		bgrolloverOff(lastanch, lastsec);
		lastanch = "";
		lastsec = "";
	}
}

// Resets the last subnav anchor rolled over
function resetSubNavBg() {
	if (lastsubanch != "") {
		bgrolloverOff(lastsubanch, lastsubsec);
		lastsubanch = "";
		lastsubsec = "";
	}
}

// Resets the last subsubnav anchor rolled over
function resetSubSubNavBg() {
	if (lastsubsubanch != "") {
		bgrolloverOff(lastsubsubanch, lastsubsubsec);
		lastsubsubanch = "";
		lastsubsubsec = "";
	}
}

function blockError(){return true;}
window.onerror = blockError;

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
    return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
    alert("Digimac - watermarked, trackable , All Rights Reserved");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

// Warning and block browser errors

function blockError(){return true;}
window.onerror = blockError;


 function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
    return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
    alert("Digimac - watermarked, trackable , All Rights Reserved");
return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;

// Remove Google Frames for foreign language sites
if (parent.frames.length > 0) top.location.replace(document.location);

// Video Script

function PlayIt(what){
player.document.getElementById('music').innerHTML='<object width="289" height="236"  '
      +'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
      +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
      +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
      +'<param name="url" value="'+what+'">'
      +'<param name="uiMode" value="full">'
      +'<param name="autoStart" value="true">'
      +'<param name="loop" value="true">'
      +'<embed type="application/x-mplayer2" '
      +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
      +'showcontrols="true" uimode="full" width="200" height="20" '
      +'src="'+what+'" autostart="true" loop="true">'
+'</object>';
}