/////
// File containing the javascript used in every page.
///

/// Google ///////////////////////////////
google_ad_client = "pub-8963337740442462";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_ad_type = "text_image";
google_color_border = "006098";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
/// End Of Google ////////////////////////

// Use a different stylesheet file according to the browser and the OS.
/*
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) < 5 )) {
	document.write("<LINK REL=stylesheet HREF='../css/nn4.css' TYPE='text/css'>"); }
else if ((navigator.appVersion.indexOf("Mac") != -1)) {
	document.write("<LINK REL=stylesheet HREF='../css/mac.css' TYPE='text/css'>"); }
else {
	document.write("<LINK REL=stylesheet HREF='../css/win.css' TYPE='text/css'>"); }
*/

//////////
// This function opens a new window with dimensions 225*420 and no toolbars.
//
function OpenCShelp(page) 
{ 	
	helpWindow=window.open(page, "CShelpWindow", "width=225,height=420,resizable=yes,menubar=no,scrollbars=yes,toolbar=no,location=no"); 
}

//////////
// Opens the Instant Messenger.
//
function OpenIM() 
{ 	
	IMwindow=window.open("im.asp", "IMwindow", "width=175,height=225,resizable=yes,menubar=no,scrollbars=no,toolbar=no,location=no"); 
}


//////////
// If enter is pressed while typing in a text box this function submits the form using its default 
// button (link).
//
function CheckEnter(e, sDefaultButton)
{ 	
	var nKeyCode;             // The code of the key pressed.

	// Get the code of the key pressed.		
	if (document.layers || (document.getElementById && !document.all))  // NN4 + NN6
		nKeyCode = e.which;		
	else if(document.all) // IE
		nKeyCode = e.keyCode;

	// If enter was pressed submit the form.
	if (nKeyCode == 13) 
	{
		// Delete the event (it is not needed anymore... the form will be submitted below). 
		if (document.layers || (document.getElementById && !document.all))  // NN4 + NN6
			e.which = null;
		else if(document.all) // IE
			e.keyCode = null;
		
		// Submit the form using the default button.
		SubmitForm(sDefaultButton);
	}
}


//////////
// This function opens a new window with dimensions 780*540 and no toolbars.
//
function OpenTour(page)
{
	tourWindow = window.open(page, "tourWindow", "width=780,height=540,resizable=yes,menubar=no,scrollbars=yes,toolbar=no,location=no");
}


//////////
// This function swaps images to create a mouse over effect.
//
function ChangeImages() {
	if (document.images) {
		for (var i=0; i<ChangeImages.arguments.length; i+=2) {
			document[ChangeImages.arguments[i]].src = ChangeImages.arguments[i+1];
		}
	}
}



