// JavaScript Document

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=375,left = 50,top = 50');");
}
// End -->

//- Popup window script for Map -

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->


function TM_UpperCase(strInput,words){//1.1
    var theString = strInput.value;
    var strOutput = "";// Our temporary string used to build the function's output
    var sp = " ";
    var small = false;
    var smallWords = words.split(",") //words that shouldn't be  capitalized
    theString = theString.replace(/(\s*)([^\s])/,"$2")//remove leading spaces
    theString = theString.toLowerCase();  
    var inputArray = theString.split(sp);
    strOutput = inputArray[0].slice(0,1).toUpperCase()+inputArray[0].slice(1);
    for (i = 1; i < inputArray.length; i++){ 
        small=false;
        for (ii=0;ii<smallWords.length;ii++){
           if(inputArray[i] == smallWords[ii]) small = true;
           }
        if(!small) inputArray[i] = inputArray[i].slice(0,1).toUpperCase()+inputArray[i].slice(1);
        strOutput = strOutput + sp + inputArray[i];  
        }
    strInput.value = strOutput;
}
//-->



<!--
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
//-->

<!--

function openWin(title,thepix,text) {
var param = "fullscreen=1,scrollbars=1";
var NewWin = open('','myDoc',param);
NewWin.document.writeln('<html><head><link rel="stylesheet" type="text/css" href="http://www.ez-sos.com/timbergear/styles/gallery.css"></head>');
NewWin.document.writeln('<body ><table width="80%" height="100%" border="0"><tr ><td></td><td valign="middle" width="500" height="100%">');
NewWin.document.writeln('<p align="center" ><span style="font-size: 14px; font-weight: 700; font-variant: small-caps; color: white; text-align: center; padding-bottom: 5px;">'+title+'</span><br /><br /><img src="'+thepix+'"><br /></p><p align="left"><span style="font-size: 12px;color: white;">'+text+'</span></p>');
NewWin.document.writeln('<p align="center"><a href="javascript:window.close();">Close This Window</a></p>');
NewWin.document.writeln('</td></tr></table></body></html>');
}

//-->


function longPopUp( page, width, height, left, top ) { 
	var yes		= 1; 
	var no		= 0; 
	var menubar     = yes;  // The File, Edit, View Menus 
	var scrollbars  = yes; // Horizontal and vertical scrollbars 
	var locationbar = no;  // The location box with the site URL 
	var directories = no;  // the "What's New", "What Cool" links 
	var resizable   = no;  // Can the window be resized? 
	var statusbar   = no;  // Status bar (with "Document: Done") 
	var toolbar     = no;  // Back, Forward, Home, Stop toolbar 
 
	features = "" + 
		"width=" + width + "," + 
		"height=" + height + "," + 
		"top=" + top + "," + 
		"left=" + left + ""; 
	features += "" + 
		(menubar ? ",menubars" : "") + 
		(scrollbars ? ",scrollbars" : "") + 
		(locationbar ? ",location" : "") + 
		(directories ? ",directories" : "") + 
		(resizable ? ",resizable" : "") + 
		(statusbar ? ",status" : "") + 
		(toolbar ? ",toolbar" : ""); 
 
	window.open( page, 'Order_Form' ); 
} 


function AddToFaves_hp(){
	var is_4up = parseInt(navigator.appVersion);
	var is_mac   = navigator.userAgent.toLowerCase().indexOf("mac")!=-1;
	var is_ie   = navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
	var thePage = location.href;
	if (thePage.lastIndexOf('#')!=-1)
		thePage = thePage.substring(0,thePage.lastIndexOf('#'));
	if (is_ie && is_4up && !is_mac) 
		window.external.AddFavorite(thePage,document.title);
	else if (is_ie || document.images)
		booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60');
	//booker_hp.focus();
	}
	
	
	function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
