function errorsuppressor(){
		window.status = 'JavaScript Error';
		return true;
	}
//window.onerror=errorsuppressor

function Goto(windowname,url){
window.open(url, windowname, "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=460,height=460")
}

var br
if(navigator.appName == "Netscape" && navigator.appVersion.charAt(0)=="4"){br="N";}
else if(navigator.appName == "Microsoft Internet Explorer" && document.all != null){br="IE";}
else if(navigator.appName == "Netscape" && document.getElementById != null && navigator.appVersion.charAt(0)=="5"){br="N5";}
else{br=null}


			
function PopUp(URL,Window,w,h,x,y) {
	var popupwin = window.open(systranURL(URL),Window,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h+",left="+x+",top="+y);
}
function NLPopUp() {
	PopUp(systranURL('http://www.choice1.com/newsletter_signup.asp'),'NL','450','360','25','25');
}

function Jump(Location) {
	opener.location.href = Location;window.close()
}
function ConfirmText(sURL) {
        var msg = ("You must have an Internet Connection of 100k or above to view this Streaming Video. If you are on a 56k Modem you will not be able to view this Video..\n\nClick OK to View Video\nClick Cancel to abort viewing")
        if (confirm(msg))
		location.href(sURL);
		
}



// data for the menu
menuData = new Array()
for (i=0; i < 10; i++) {
	menuData[i] = new Array(40)
	for (j=0; j < 20; j++) {
		menuData[i][j] = new Array(2)}}
menuData[0][0][0]="Testimonials";
menuData[0][0][1]="/1stchoice_testimonials.htm";
//menuData[0][1][0]="bar";
//menuData[0][1][1]="";
menuData[0][2][0]="Customer Service";
menuData[0][2][1]="/contact_support.htm";
menuData[0][3][0]="Press";
menuData[0][3][1]="/press_releases.htm";
menuData[0][4][0]="Help - FAQ";
menuData[0][4][1]="/site_help.htm";
menuData[0][5][0]="Web Development";
menuData[0][5][1]="/web_development.htm";
menuData[0][6][0]="News Letters";
menuData[0][6][1]="/1stchoice_newsletters.htm";

menuData[1][0][0]="Open NotePad";
menuData[1][0][1]="javascript:objNotePad.Maximize();";
menuData[1][1][0]="Close NotePad";
menuData[1][1][1]="javascript:objNotePad.Hide()";
menuData[1][2][0]="About NotePad";
menuData[1][2][1]="/1stchoice_notepad.htm";

menuData[2][0][0]="My Destinations";
menuData[2][0][1]="/my1stchoice/my_destinations.htm";
menuData[2][1][0]="My Specials";
menuData[2][1][1]="/my1stchoice/my_specials.htm";


// drop down functions
// define menu attributes here
menuColor="#4F60A4"
menuColorOn="#ffffff"
fontColorOn="#FF9900"
fontColorOff="#FFFFFF"
lineColor = "#4F60A4"
BorderColor = "#4F60A4"
separator="<img src=http://www.choice1.com/images/site/spacer.gif height=1 width=1>"
// shows the drop down menu expected arg is active div
function showDDNav(){
	args = showDDNav.arguments;
	var divName = args[0];
	var divRef;
	
	if(br=="N"){
		divRef=eval("document." + divName);
		if(divRef.visibility=='hide'){
			divRef.visibility = 'show';
		}
	} else {
		if (br=="NS6") {
			divRef=eval("document.getElementById('" + divName + "')");
		} else {
			divRef=eval("document.all." + divName);
		}
		if(divRef.style.visibility=='hidden'){
			divRef.style.visibility = 'visible';
		}
	}
}
// hides the drop down menu 
// expected arg is active div 
function hideDDNav(){
	args = hideDDNav.arguments;
	var divName = args[0];
	var divRef;
	
	if(br=="N"){
		divRef=eval("document." + divName);
		if(divRef.visibility=='show'){
			divRef.visibility = 'hide';
		}
	} else {
		if (br=="NS6") {
			divRef=eval("document.getElementById('" + divName + "')");
		} else {
			divRef=eval("document.all." + divName);
		}
		if(divRef.style.visibility=='visible'){
			divRef.style.visibility = 'hidden';
		}
	}
}
// hides drop down menu when menu is active IE & NS6
// expected arg is active menu
function hideDiv(){
	args = hideDiv.arguments;
	var divName = args[0];
	var divRef;
	// fix menu flicker problem in IE
	if(br=="IE"){
		divRef=eval("document.all." + divName);
		// calculate active size of menu
		leftDiv=divRef.offsetLeft +2
		rightDiv=divRef.offsetLeft + divRef.clientWidth -2
		topDiv=divRef.offsetTop +2
		bottomDiv=divRef.offsetTop + divRef.clientHeight -2		
		if(window.event.clientY > bottomDiv || 
			window.event.clientY < topDiv || 
			window.event.clientX < leftDiv || 
			window.event.clientX > rightDiv){
				divRef.style.visibility = 'hidden';
		}
	// NS6
	} else {
		divRef=eval("document.getElementById('" + divName + "')");
		divRef.style.visibility = 'hidden';
	}	
}
// highlight menuitem in IE & NS6
// expected arg is active menuitem
function divOver(){
	args = divOver.arguments;
	var divName = args[0];
	var divRef;
	
	if (br=="NS6") {
		divRef=eval("document.getElementById('" + divName + "')");
		divRef.style.cursor = "pointer";
	} else {
		divRef=eval("document.all." + divName);
	}
	divRef.style.backgroundColor = menuColorOn;
	divRef.style.color = fontColorOn;
	divRef.style.fontWeight = "bold";
}
// highlight off menuitem in IE & NS6
// expected arg is active menuitem
function divOut(){
	args = divOut.arguments;
	var divName = args[0];
	var divRef;
	
	if (br=="NS6") {
		divRef=eval("document.getElementById('" + divName + "')");
	} else {
		divRef=eval("document.all." + divName);
	}
	divRef.style.backgroundColor=menuColor;
	divRef.style.color = fontColorOff;
	divRef.style.fontWeight = "bold";
}
// highlight on menuitem in netscape 4.x expected arg is active menuitem
function menuOver(){
	var args, theMenu;
	args = menuOver.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor=menuColorOn 
}
// highlight off menuitem in netscape 4.x expected arg is active menuitem
function menuOut(){
	var args, theMenu;
	args = menuOut.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor=menuColor 
}
// goes to specified url expected arg is url 
function gotoUrl(){
	args = gotoUrl.arguments;
	var CM_Location, CM_Javascript;
	if (CM_Javascript != -1) {CM_Location = args[0]}
	location.href = (CM_Location)
}
// hides specified tag
function hideElement(HTMLtag)
{
	for (i = 0; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "hidden";
	}
}
// shows specified tag
function showElement(HTMLtag)
{
	for (i = 1; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "visible";
	}
}
// build the divs for IE & Netscape 6
// expected args are 'div name','x in menudata aray','menu left coord','top in pixels' 
var tdID = 0
function doDiv(){
	args = doDiv.arguments;
	var divID = args[0];
	var x = args[1];
	var divLeft = args[2];
	var divTop = args[3];
	var divWidth = args[4];
	objDiv = "<div id=\"" + divID + "\" style=\"position:absolute; width:" + divWidth + "px; z-index:2; top:"+ divTop +"px; left: " + divLeft + ";  background-color: #4F60A4; border-right:1 thin solid #0D265A; border-bottom:1 thin solid #0D265A;  visibility: hidden;\" onMouseover=\"showDDNav('"+ divID +"')\" onMouseout=\"hideDiv('"+ divID +"')\">"
	objDiv += "<div id=\"spacer\" style=\"position:relative; height:6px; width:" + divWidth  + "px; z-index:3;  font-size:1;\"></div>"
	
	for (y = 0; y < 17; y++){
	    if(menuData[x][y][0]!=null){
		
		   if(menuData[x][y][0]=="bar"){
		   
		   objDiv += "<div id=\"spacer\" style=\"position:relative; height:3px; width:" + divWidth + "px; z-index:3;  font-size:1;\"></div>"
		   objDiv += "<div id=\"bar\" style=\"position:relative; height:1; width:" + divWidth + "px; z-index:3;  background-color:#CCCCCC;\">" + separator + "</div>"
           objDiv += "<div id=\"spacer\" style=\"position:relative; height:3px; width:" + divWidth + "px; z-index:3;  font-size:1;\"></div>"
		
		   } else {
		   
		   objDiv += "<div id=\"x" + tdID + "\" style=\"position:relative; background-color:"+ menuColor +"; width:" + divWidth + "px; z-index:3; \" onMouseover=\"divOver('x" + tdID + "')\" onMouseout=\"divOut('x" + tdID + "')\" class=\"dhtmlNav\" onClick=\"gotoUrl('"+menuData[x][y][1]+"')\">&nbsp;"+ menuData[x][y][0] +"&nbsp;</div>"
		   
		   }
		
		tdID = tdID +1
		}
	}
	objDiv += "<div id=\"bar\" style=\"position:relative; height:1; width:" + divWidth + "px; z-index:3;  background-color:" + lineColor + ";\">" + separator + "</div>"
	objDiv += "<div id=\"spacer\" style=\"position:relative; height:6px; width:" + divWidth + "px; z-index:3;  font-size:1;\"></div></div>"
	
	document.write(objDiv);
}
// build the layers for netscape4 expected args are 'div name','x in menudata aray','menu left coord','top in pixels' 
function doLayer(){
	args = doLayer.arguments;
	var nestLayerID=0
	var layerID = args[0];
	var x = args[1];
	var layerLeft = args[2];
	var layerTop = args[3];
	var layerWidth = args[4];
	if(navigator.platform.indexOf("Win") < 0){layerInc=16;layerStyle="netMenuMac";}
	else{layerInc=15;layerStyle="netMenu";}	
		
	objDiv = "<layer id=\""+ layerID +"\" Z-INDEX=1 BGCOLOR=\""+ menuColor +"\" WIDTH=" + layerWidth + " LEFT="+ layerLeft +" TOP="+ layerTop +" VISIBILITY=HIDE onmouseover=\"showDDNav('"+ layerID +"')\" onmouseout=\"hideDDNav('"+ layerID +"')\">"
	
	var nestTop=10
		for (y = 0; y < 17; y++){
				
		    if(menuData[x][y][0]!=null){
				if(menuData[x][y][0]=="bar"){
		   
			    objDiv += "<layer id=\"spacer\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + eval(layerWidth - 10) + " HEIGHT=5 Z-INDEX=8 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"
				nestLayerID=nestLayerID+1
				nestTop=nestTop+5			    
				
				objDiv += "<layer id=\"line2\" BGCOLOR=#CCCCCC WIDTH=" + eval(layerWidth - 10) + " HEIGHT=1 Z-INDEX=11 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"
				nestLayerID=nestLayerID+1
				nestTop=nestTop+1
				
				objDiv += "<layer id=\"spacer2\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + eval(layerWidth - 10) + " HEIGHT=5 Z-INDEX=8 LEFT=5 TOP="+ nestTop +">"+ separator +"</layer>"				
				nestLayerID=nestLayerID+1
				nestTop=nestTop+5
				
				} else {
		   			    
				objDiv += "<layer id=\"x"+nestLayerID+"\" class=\""+ layerStyle +"\" Z-INDEX=7 BGCOLOR=\""+ menuColor +"\" HEIGHT=19 WIDTH=" + eval(layerWidth - 10) + " LEFT=5 TOP="+ nestTop +" onmouseover=\"menuOver('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\" onmouseout=\"menuOut('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\"><a id=navstyle  href=javascript:gotoUrl('"+menuData[x][y][1]+"')><font color=" + fontColorOff + ">"+ menuData[x][y][0]
				objDiv +="</font></a></layer>"		
				nestLayerID=nestLayerID+1
				nestTop=nestTop+layerInc+1
							
				}
			
			}
		}
		//objDiv += "<layer id=\"line2\" BGCOLOR=\""+ lineColor +"\" WIDTH=" + eval(layerWidth - 10) + " LEFT=5 HEIGHT=1 Z-INDEX=8 TOP="+ nestTop +">"+ separator +"</layer>"
		objDiv +="<layer id=\"lineEnd\" BGCOLOR=\""+ menuColor +"\" WIDTH=" + layerWidth + " HEIGHT=8 Z-INDEX=7 TOP="+ nestTop +"></layer></layer>"
	document.write(objDiv)
}
// Netscape Resize Function for Layers
//function reDo(){window.location.reload()}
//function setResize(){setTimeout("window.onresize=reDo",500);}
//	if(br=="N"){
//	window.onload = setResize;
//}


// layers Menu location on page

if(br=="N"){
	doLayer('aboutus',0,255,22,150)
	doLayer('notepad',1,361,22,150)
    doLayer('my1stchoice',2,445,20,135)
}
else {
	doDiv('aboutus',0,285,22,150)
	doDiv('notepad',1,361,22,150)
	doDiv('my1stchoice',2,445,20,135)

}
// style sheets info
browser = navigator.appName;
  version = navigator.appVersion;
  os = navigator.platform;
  ie = "Microsoft Internet Explorer";
  nn = "Netscape";
    // sniff for netscape
  if (browser == nn) {
  	// sniff for Mac and give them the default stylesheet
    if (os == "MacPPC") {
  	  document.write('<link href="http://www.choice1.com/css/default.css" rel="stylesheet" type="text/css" title="master">');
	}
	// sniff for anything greater than version 4 of Netscape and give them the default stylesheet
	if (version.charAt(0) > 4) {
	  document.write('<link href="http://www.choice1.com/css/default.css" rel="stylesheet" type="text/css" title="master">');
	}
	// give Netscape 4.x users the netscape stylesheet
	else {
	  document.write('<link href="http://www.choice1.com/css/netscape.css" rel="stylesheet" type="text/css" title="master">');
  	}
  }
  // give everyone else (IE) the default stylesheet
  else {
    document.write('<link href="http://www.choice1.com/css/default.css" rel="stylesheet" type="text/css" title="master">');
  }
// reload the window upon resize to fix a bug in Netscape 4.x
var br
if(navigator.appName == 'Netscape') {
	if(document.layers) {br="N"}
	else if(document.getElementById) {br="NS6"}
} else{br="IE";}
function reDo(){window.location.reload()}
function setResize(){setTimeout("window.onresize=reDo",500);}
	if(br=="N"){
	window.onload = setResize;
}
//if (browser == nn) {
//	document.write('<link rel=stylesheet type="text/css" href="/css/netscape.css" title=master>');
//} 
//else {
//	document.write('<link rel=stylesheet type="text/css" href="/css/default.css" title=master>');
//}
//js library
function OpenScrollingPopup(URL, width, height) {
	window.self.name = "main";
	var now = new Date();
	var remote = window.open(systranURL(URL), "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=yes");
}
// ----- END: FOR OPENING GENERAL POPUP WINDOWS -----
// ----- BEGIN: FOR HIDING/SHOWING LAYERS -----
function showLayer(strLayerName) {
	if(document.all)
		document.all[strLayerName].style.display = 'block';
	else if(document.layers)
		document.layers[strLayerName].display = 'block';
}
function hideLayer(strLayerName) {
	if(document.all)
		document.all[strLayerName].style.display = 'none';
	else if(document.layers)
		document.layers[strLayerName].display = 'none';
}
// ----- END: FOR HIDING/SHOWING LAYERS -----
function swapImage(strImgName, strImgSrc) {
	if(document.images)
		document.images[strImgName].src = strImgSrc;
}

// ----- BEGIN: FOR GETTING COOKIES -----
function getCookie(strName) {
	var strCookie = document.cookie;
	if(strCookie.length == 0) return '';
	var strValue = '';
	var intStart = strCookie.indexOf(strName + '=');
	if(intStart > -1) {
		intStart += strName.length + 1;
		var intEnd = strCookie.indexOf(';', intStart + 1);
		if(intEnd == -1) intEnd = strCookie.length;
		strValue = strCookie.substring(intStart, intEnd);
	}
	return strValue;
}
function setCookie(strName, strValue, strExp) {
	document.cookie = strName + '=' + strValue
			+ (document.location.hostname == 'www.choice1.com' ? '' : '')
			+ (strExp == '' ? '' : ';expires=' + strExp);
}
function setCookieWithPath(strName, strValue, strPath, strExp) {
	document.cookie = strName + '=' + strValue
			+ (document.location.hostname == 'www.choice1.com' ? '' : '')
			//+ (strPath == '' ? '' : ';path=' + strPath)
			+ (strExp == '' ? '' : ';expires=' + strExp);
}
function deleteCookie(strName) {
	var dtmExp = new Date();
	dtmExp.setTime(dtmExp.getTime() - 3600000); // 1 hr ago
	setCookieWithPath(strName, '', '/', dtmExp.toGMTString())
}
// ----- END: FOR GETTING COOKIES -----

// ----- BEGIN: FOR STRING/NUMBER CONVERSIONS -----
function isNumericString(strOrig) {
	if(strOrig.length==0) return false;
	var strChar;
	var strValidChars = "1234567890$,";
	for (var i = 0; i < strOrig.length; i++) {
		strChar = strOrig.substring(i, i+1);
		if (strValidChars.indexOf(strChar, 0) == -1)
			return false;
	}
	return true;
}
function isValidEmail(strEmail) {
	var strBadChars, strChar, strSuffix, intNumBadChars, intCount, intPos, intPosPeriod
	// --- CHECKING FOR BAD CHARACTERS ---
	strBadChars = ' /:,#\'"`$~!%^&*();<>?\\|{}[]';
	intNumBadChars = strBadChars.length
	for(intCount = 0;  intCount < intNumBadChars;  ++intCount) {
		strChar = strBadChars.substring(intCount, 1);
		if(strEmail.indexOf(strChar) > 0)
			return false;
	}
	// --- CHECKING FOR THE @ SIGN ---
	intPos = strEmail.indexOf('@')
	if(intPos == -1)
		return false;
	// --- CHECKING FOR A . AFTER THE @ SIGN ---
	intPosPeriod = strEmail.indexOf('.', intPos);
	if(intPosPeriod == -1)
		return false;
	// --- CHECKING FOR AT LEAST 2 AFTER THE PERIOD ---
	if(strEmail.length - intPosPeriod < 3)
		return false;
	// --- ALL CHECKS OUT - MUST BE OKAY ---
	return true;
}
// ----- END: FOR STRING/NUMBER CONVERSIONS -----


// open note pad 

var notepad_page
	var paddir
	// BROWSER CHECK
	browser = navigator.appName;
	appVer = parseInt(navigator.appVersion);
	ie = "Microsoft Internet Explorer";
	ns = "Netscape";
	if (browser == ns && appVer < 5) {
			notepad_page = "_ns";
	}else{
	        notepad_page = "_ie";
			
	} 

if(document.all || document.layers || document.getElementById) {
	document.write('<' + 'SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="http://www.choice1.com/inc/js/notepad'+notepad_page+'.js"></' + 'SCRIPT>');

}


var objNotePad = null, divSP = null, imgPreloads;
function loadNotePadObj() {
	if(blnNotePadJSLoaded)
		objNotePad = new jsNotePad('objNotePad', divSP);
	else
		setTimeout('loadNotePadObj()', 1111);
}
function initNotePad() {
	if(document.getElementById)
		divSP = document.getElementById('divNotePad');
	else if(document.all)
		divSP = document.all('divNotePad');
	else if(document.layers)
		divSP = document.layers['divNotePad'];
	if(divSP != null) {
		loadNotePadObj();


		
	}
}


// new menu 


//----------------------------------------------------------------------------
// Code to determine the browser and version.
//----------------------------------------------------------------------------

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "Opera";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as Netscape 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = ua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
}

var browser = new Browser();

//----------------------------------------------------------------------------
// Code for handling the menu bar and active button.
//----------------------------------------------------------------------------

var activeButton = null;

function buttonClick(event, menuId) {

  var button;

  // Get the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // Blur focus from the link to remove that annoying outline.

  button.blur();

  // Associate the named menu to this button if not already done.
  // Additionally, initialize menu display.

  if (button.menu == null) {
    button.menu = document.getElementById(menuId);
    if (button.menu.isInitialized == null)
      menuInit(button.menu);
  }

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;

  // Exit if this button is the currently active one.

  if (button == activeButton)
    return false;

  // [END MODIFIED]

  // Reset the currently active button, if any.

  if (activeButton != null)
    resetButton(activeButton);

  // Activate this button, unless it was the currently active one.

  if (button != activeButton) {
    depressButton(button);
    activeButton = button;
  }
  else
    activeButton = null;

  return false;
}

function buttonMouseover(event, menuId) {

  var button;

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Activates this button's menu if no other is currently active.

  if (activeButton == null) {
    buttonClick(event, menuId);
    return;
  }

  // [END MODIFIED]

  // Find the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;

  // If any other button menu is active, make this one active instead.

  if (activeButton != null && activeButton != button)
    buttonClick(event, menuId);
}

function depressButton(button) {

  var x, y;

  // Update the button's style class to make it look like it's
  // depressed.

  button.className += " menuButtonActive";

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the button, if not already done.

  if (button.onmouseout == null)
    button.onmouseout = buttonOrMenuMouseout;
  if (button.menu.onmouseout == null)
    button.menu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // Position the associated drop down menu under the button and
  // show it.

  x = getPageOffsetLeft(button);
  y = getPageOffsetTop(button) + button.offsetHeight;

  // For IE, adjust position.

  if (browser.isIE) {
    x += button.offsetParent.clientLeft;
    y += button.offsetParent.clientTop;
  }

  // set the x variable + a number to push right
  //set the y variable + a number to push down
  button.menu.style.left = x + "px";
  button.menu.style.top  = y + "px";
  button.menu.style.visibility = "visible";
}

function resetButton(button) {

  // Restore the button's style class.

  removeClassName(button, "menuButtonActive");

  // Hide the button's menu, first closing any sub menus.

  if (button.menu != null) {
    closeSubMenu(button.menu);
    button.menu.style.visibility = "hidden";
  }
}

//----------------------------------------------------------------------------
// Code to handle the menus and sub menus.
//----------------------------------------------------------------------------

function menuMouseover(event) {

  var menu;

  // Find the target menu element.

  if (browser.isIE)
    menu = getContainerWith(window.event.srcElement, "DIV", "menu");
  else
    menu = event.currentTarget;

  // Close any active sub menu.

  if (menu.activeItem != null)
    closeSubMenu(menu);
}

function menuItemMouseover(event, menuId) {

  var item, menu, x, y;

  // Find the target item element and its parent menu element.

  if (browser.isIE)
    item = getContainerWith(window.event.srcElement, "A", "menuItem");
  else
    item = event.currentTarget;
  menu = getContainerWith(item, "DIV", "menu");

  // Close any active sub menu and mark this one as active.

  if (menu.activeItem != null)
    closeSubMenu(menu);
  menu.activeItem = item;

  // Highlight the item element.

  item.className += " menuItemHighlight";

  // Initialize the sub menu, if not already done.

  if (item.subMenu == null) {
    item.subMenu = document.getElementById(menuId);
    if (item.subMenu.isInitialized == null)
      menuInit(item.subMenu);
  }

  // [MODIFIED] Added for activate/deactivate on mouseover.

  // Set mouseout event handler for the sub menu, if not already done.

  if (item.subMenu.onmouseout == null)
    item.subMenu.onmouseout = buttonOrMenuMouseout;

  // [END MODIFIED]

  // Get position for submenu based on the menu item.

  x = getPageOffsetLeft(item) + item.offsetWidth;
  y = getPageOffsetTop(item);

  // Adjust position to fit in view.

  var maxX, maxY;

  if (browser.isIE) {
    maxX = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) +
      (document.documentElement.clientWidth != 0 ? document.documentElement.clientWidth : document.body.clientWidth);
    maxY = Math.max(document.documentElement.scrollTop, document.body.scrollTop) +
      (document.documentElement.clientHeight != 0 ? document.documentElement.clientHeight : document.body.clientHeight);
  }
  if (browser.isOP) {
    maxX = document.documentElement.scrollLeft + window.innerWidth;
    maxY = document.documentElement.scrollTop  + window.innerHeight;
  }
  if (browser.isNS) {
    maxX = window.scrollX + window.innerWidth;
    maxY = window.scrollY + window.innerHeight;
  }
  maxX -= item.subMenu.offsetWidth;
  maxY -= item.subMenu.offsetHeight;

  if (x > maxX)
    x = Math.max(0, x - item.offsetWidth - item.subMenu.offsetWidth
      + (menu.offsetWidth - item.offsetWidth));
  y = Math.max(0, Math.min(y, maxY));

  // Position and show the sub menu.

  item.subMenu.style.left = x + "px";
  item.subMenu.style.top  = y + "px";
  item.subMenu.style.visibility = "visible";

  // Stop the event from bubbling.

  if (browser.isIE)
    window.event.cancelBubble = true;
  else
    event.stopPropagation();
}

function closeSubMenu(menu) {

  if (menu == null || menu.activeItem == null)
    return;

  // Recursively close any sub menus.

  if (menu.activeItem.subMenu != null) {
    closeSubMenu(menu.activeItem.subMenu);
    menu.activeItem.subMenu.style.visibility = "hidden";
    menu.activeItem.subMenu = null;
  }
  removeClassName(menu.activeItem, "menuItemHighlight");
  menu.activeItem = null;
}

// [MODIFIED] Added for activate/deactivate on mouseover. Handler for mouseout
// event on buttons and menus.

function buttonOrMenuMouseout(event) {

  var el;

  // If there is no active button, exit.

  if (activeButton == null)
    return;

  // Find the element the mouse is moving to.

  if (browser.isIE)
    el = window.event.toElement;
  else if (event.relatedTarget != null)
      el = (event.relatedTarget.tagName ? event.relatedTarget : event.relatedTarget.parentNode);

  // If the element is not part of a menu, reset the active button.

  if (getContainerWith(el, "DIV", "menu") == null) {
    resetButton(activeButton);
    activeButton = null;
  }
}

// [END MODIFIED]

//----------------------------------------------------------------------------
// Code to initialize menus.
//----------------------------------------------------------------------------

function menuInit(menu) {

  var itemList, spanList;
  var textEl, arrowEl;
  var itemWidth;
  var w, dw;
  var i, j;

  // For IE, replace arrow characters.

  if (browser.isIE) {
    menu.style.lineHeight = "2.5ex";
    spanList = menu.getElementsByTagName("SPAN");
    for (i = 0; i < spanList.length; i++)
      if (hasClassName(spanList[i], "menuItemArrow")) {
        spanList[i].style.fontFamily = "Webdings";
        spanList[i].firstChild.nodeValue = "4";
      }
  }

  // Find the width of a menu item.

  itemList = menu.getElementsByTagName("A");
  if (itemList.length > 0)
    itemWidth = itemList[0].offsetWidth;
  else
    return;

  // For items with arrows, add padding to item text to make the
  // arrows flush right.

  for (i = 0; i < itemList.length; i++) {
    spanList = itemList[i].getElementsByTagName("SPAN");
    textEl  = null;
    arrowEl = null;
    for (j = 0; j < spanList.length; j++) {
      if (hasClassName(spanList[j], "menuItemText"))
        textEl = spanList[j];
      if (hasClassName(spanList[j], "menuItemArrow"))
        arrowEl = spanList[j];
    }
    if (textEl != null && arrowEl != null) {
      textEl.style.paddingRight = (itemWidth 
        - (textEl.offsetWidth + arrowEl.offsetWidth)) + "px";
      // For Opera, remove the negative right margin to fix a display bug.
      if (browser.isOP)
        arrowEl.style.marginRight = "0px";
    }
  }

  // Fix IE hover problem by setting an explicit width on first item of
  // the menu.

  if (browser.isIE) {
    w = itemList[0].offsetWidth;
    itemList[0].style.width = w + "px";
    dw = itemList[0].offsetWidth - w;
    w -= dw;
    itemList[0].style.width = w + "px";
  }

  // Mark menu as initialized.

  menu.isInitialized = true;
}

//----------------------------------------------------------------------------
// General utility functions.
//----------------------------------------------------------------------------

function getContainerWith(node, tagName, className) {

  // Starting with the given node, find the nearest containing element
  // with the specified tag name and style class.

  while (node != null) {
    if (node.tagName != null && node.tagName == tagName &&
        hasClassName(node, className))
      return node;
    node = node.parentNode;
  }

  return node;
}

function hasClassName(el, name) {

  var i, list;

  // Return true if the given element currently has the given class
  // name.

  list = el.className.split(" ");
  for (i = 0; i < list.length; i++)
    if (list[i] == name)
      return true;

  return false;
}

function removeClassName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

function getPageOffsetLeft(el) {

  var x;

  // Return the x coordinate of an element relative to the page.

  x = el.offsetLeft;
  if (el.offsetParent != null)
    x += getPageOffsetLeft(el.offsetParent);

  return x;
}

function getPageOffsetTop(el) {

  var y;

  // Return the x coordinate of an element relative to the page.

  y = el.offsetTop;
  if (el.offsetParent != null)
    y += getPageOffsetTop(el.offsetParent);

  return y;
}

//]]>

// google keyword scripts

google_ad_client = "pub-8753942663724567";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "4F60A4";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
// end google information


