﻿<!--

		function replaceSearch(field) {
				field.focus();
				field.blur();
				field.select();
			 }
			
	function MM_preloadImages() { //v2.0
			  if (document.images) {
			    var imgFiles = MM_preloadImages.arguments;
			    if (document.preloadArray==null) document.preloadArray = new Array();
			    var i = document.preloadArray.length;
			    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
			      preloadArray[i] = new Image;
			      preloadArray[i++].src = imgFiles[j];
			  } }
			}
			
	function MM_swapImgRestore() { //v2.0
			  if (document.MM_swapImgData != null)
			    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
			      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
			}
			
	function MM_swapImage() { //v2.0
			  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
			  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
			    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
			    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
			        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
			      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
			    obj = eval(objStr);
			    if (obj != null) {
			      swapArray[j++] = obj;
			      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];			      obj.src = MM_swapImage.arguments[i+2];			  } }			  document.MM_swapImgData = swapArray; //used for restore			}
	function formHandler(form){
		if(form.site.options[form.site.selectedIndex].value != "")
		window.location.href = form.site.options[form.site.selectedIndex].value;
		}
		
	/****************************************************
	     Author: Eric King
	     Url: http://redrival.com/eak/index.shtml
	     This script is free to use as long as this info is left in
	     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
	****************************************************/
	var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);
	win.focus();
	}		//if (top.location != location) top.location.href = location.href;		function putFocus(formInst, elementInst) {	  if (document.forms.length > 0) {	   document.forms[formInst].elements[elementInst].focus();	  }	 }		function placeFocus() {			if (document.forms.length > 0) {			var field = document.forms[0];			for (i = 0; i < field.length; i++) {			if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {			document.forms[0].elements[i].focus();			break;
			         }
			      }
			   }
			}
	function submitenter(myfield,e)
			{
			var keycode;
			if (window.event) keycode = window.event.keyCode;
			else if (e) keycode = e.which;
			else return true;
			if (keycode == 13)
			{
			myfield.form.submit();
			return false;
			}
			else
			return true;
			}

			NS4 = (document.layers) ? true : false;
			
	function checkEnter(event)
			{ 	
				var code = 0;
				
				if (NS4)
					code = event.which;
				else
					code = event.keyCode;
				if (code==13)
					document.login.submit(); //This is custom to National City - change login to forms(0) to reset
			}
	// -->

window.name = "main"

	function sendDownloadFunc()
	{	  
	  //alert("test");
	  
	  //alert(document.downloadform.downloadbox1.value);
	  //alert(document.downloadform.downloadbox1.checked);
	  document.downloadform.action="/download/testdownloadzip.asp";
	  window.open("/download/testdownloadzip.asp","test","'toolbar,width=750,height=350'");
	  document.downloadform.target="test";
	  document.downloadform.submit();
	  //document.submit();
	  //document.downloadform.submit;
	}
    function selectAll(cbList,bSelect) {
      for (var i=0; i<cbList.length; i++) 
        cbList[i].selected = cbList[i].checked = bSelect
    }

    function ToggleAll(e,cbList) {
	    if (e.checked) {
	      //alert("yes");
	     // for (var i = 0; i<document.formName.elements.length; i++) 
	      for (var i = 0; i < document.downloadform.elements.length; i++)
	      {
	      document.downloadform.elements[i].checked=true
	      }
	    }
	    else {
	      //alert("no");
	      for (var i = 0; i < document.downloadform.elements.length; i++)
	      {
	      document.downloadform.elements[i].checked=false
	      }
	    }
    }
    function Verify()
			{
			  if(document.verify.box1.checked==false || document.verify.box2.checked==false || document.verify.box3.checked==false)
			  {
			    alert("If you agree with the conditions, please check all three boxes");
			    return false;
			  }
				// The following code, when enabled, will force selection of a company as well
				if (document.verify.company.value == 0)	
				 {
				 	alert("Please select the company you work for from the list before proceeding.");
					return false;
				 }	

			    document.verify.submit();
			   }
	
	function go33(){
		if (document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value != "0") {
		location = document.selecter1.select1.options[document.selecter1.select1.selectedIndex].value
				}
			}
			
	
	function go5(){
		if (document.selecter1.select2.options[document.selecter1.select2.selectedIndex].value != "0") {
		location = document.selecter1.select2.options[document.selecter1.select2.selectedIndex].value
				}
			}
		
	function go3(){
		if (document.selecter1.select3.options[document.selecter1.select3.selectedIndex].value != "0") {
		location = document.selecter1.select3.options[document.selecter1.select3.selectedIndex].value
				}
			}		function go4(){		if (document.selecter1.select4.options[document.selecter1.select4.selectedIndex].value != "0") {		location = document.selecter1.select4.options[document.selecter1.select4.selectedIndex].value				}			}					   	function downloadfile(fileroot){	
		      window.location=fileroot;
		      //alert (fileroot);
		}
	   
		function decision(message, url){		//if(confirm(message)) location.href = url;		if(confirm(message)) window.open(url);				}				  
// BEGIN HOME PAGE TAB FUNCTIONS //
window.onload = function(){;setBehavior();}; 

function setBehavior(){
	tabs = document.getElementsByTagName('dt');
	for (t=0;t < tabs.length; t++ ){
		if(tabs[t].parentNode.parentNode.className == 'home_tabs'){
			tabs[t].onclick = activateTab;
			//alert(tabs[t].onclick);
		}
	}
};

function activateTab(){
	tabs = document.getElementsByTagName('dt');
	for (t=0;t < tabs.length; t++ ){
		if(tabs[t].className == 'current'){tabs[t].className="";}
	}
	page = document.getElementsByTagName('dd');
	for (t=0;t < page.length; t++ ){
		if(page[t].className == 'current'){page[t].className="";}
	}
	this.className="current";
	dd = this.nextSibling;
	if(dd.nodeType!=1){dd = dd.nextSibling;}	dd.className="current";		};function displayIGuideSub(id){
	if (document.getElementById(id).style.display=="block")	{		document.getElementById("img_"+id).src="images/plus.gif"; 
		document.getElementById(id).style.display="none"; 	}	else	{
		document.getElementById("img_"+id).src="images/minus.gif"; 
		document.getElementById(id).style.display="block"; 
	}

}

function SequenceArrows(elementName, arrayName, arrow, captionId, displayId)
{
	arrayName2 = eval(arrayName)
	currentImage = document.getElementById(elementName).src
	//alert(currentImage);
	//remove the full path from the currentImage

	for (i=0;i<arrayName2.length;i++)
	{
		document.getElementById('link_'+displayId+'_'+ i).className='number';
	}

	for (i=0;i<arrayName2.length;i++)
	{   
		if (currentImage.indexOf(arrayName2[i][0])!=-1)
		{   
			if (arrow == 'previous')
			{
			    
				if(i==0)
				{
					i=arrayName2.length;
				}
				document.getElementById(elementName).src = 	arrayName2[i-1][0];
				//alert(document.getElementById(elementName).src);
				document.getElementById(captionId).innerHTML=arrayName2[i-1][1];
				//alert('link_'+displayId+'_'+ eval(i-1));
				document.getElementById('link_'+displayId+'_'+ eval(i-1)).className='active';
				document.getElementById('sequence_img_'+displayId).title='';

				//alert(arrayName2[i-1][2]);
				if (arrayName2[i-1][2]!= '')
				{
					document.getElementById('sequence_img_'+displayId).style.cursor='pointer';
					document.getElementById('sequence_img_'+displayId).title='Click to enlarge';
				}
				else
				{
					document.getElementById('sequence_img_'+displayId).style.cursor='';
					document.getElementById('sequence_img_'+displayId).title='';
				}
				return false;
			}
			if (arrow == 'next')
			{
				if (i+1==arrayName2.length)
				{
					i = -1;
				}
				document.getElementById(elementName).src = 	arrayName2[i+1][0]
				document.getElementById(captionId).innerHTML=arrayName2[i+1][1];
				//alert('link_'+displayId+'_'+ i+1);
				document.getElementById('link_'+displayId+'_'+ eval(i+1)).className='active';
				if (arrayName2[i+1][2]!= '')
				{
					document.getElementById('sequence_img_'+displayId).style.cursor='pointer';
					document.getElementById('sequence_img_'+displayId).title='Click to enlarge';
				}
				else
				{
					document.getElementById('sequence_img_'+displayId).style.cursor='';
					document.getElementById('sequence_img_'+displayId).title='';
				}
				return false;
			}
			
		}
	} 
}

function ChangeArrowClass(array, selectedItem, displayId)
//array, selected index, displayId
{
	arrayName2 = eval(array)
	numItems = arrayName2.length
		//alert(numItems);
	for (i=0;i<numItems;i++)
	{
		if(i==selectedItem)
		{
			document.getElementById('link_'+displayId+'_'+i).className='active';
			document.getElementById('sequence_img_'+displayId).title='';
			if (arrayName2[i][2]!= '')
			{
				document.getElementById('sequence_img_'+displayId).style.cursor='pointer';
				document.getElementById('sequence_img_'+displayId).title='Click to enlarge';
			}
			else
			{
				document.getElementById('sequence_img_'+displayId).style.cursor='';
				document.getElementById('sequence_img_'+displayId).title='';
			}
		}
		else
		{
			document.getElementById('link_'+displayId+'_'+i).className='number';
		}
	}	//'link_"&display_id&"_"&x&"'
	//document.getElementById(selectedItem).className='active';
}

function ContentZoom(displayId)
{
	currentImage = 'sequence_img_'+displayId	arrayName2 = eval('Display_'+displayId)
	imgSrc = document.getElementById(currentImage).src;
	for (i=0;i<arrayName2.length;i++)
	{
		if (imgSrc.indexOf(arrayName2[i][0])!=-1)		{			if(arrayName2[i][2]!= '')
			{
				window.open('content_zoom.asp?img_src='+arrayName2[i][2], 'content_zoom', 'fullscreen=yes, scrollbars=1, resizable=1, menubar=1');
				//NewWindow('content_zoom.asp?img_src='+arrayName2[i][2],'content_zoom',800,650,'yes','center')
			}
		}
	}
} // END HOME PAGE TAB FUNCTIONS ////-->