/* AUTHOR     : Katie Williar, Intermedia Kiosk, Inc.

   Copyright (c)2006. All Rights Reserved

----------------------------------------------------------------------------------------------------

                                 G L O B A L   V A R I A B L E S

----------------------------------------------------------------------------------------------------*/

var winTop      = (screen.height-713)/2;                         // Window Centering Calculations

var winLeft     = (screen.width-950)/2;

var layerRef    = 'document.all';

var styleSwitch = '.style';

var viewSwitch  = '"visible"';

var hideSwitch  = '"hidden"';

var isNS = isIE = false;

var rWin = null;

var d           = new Date();

var oPopup = window.createPopup();



/*////////////////////////////////////////////////////////////////////////////////////////////////////

//                          S H A R E D   F U N C T I O N A L I T Y

//////////////////////////////////////////////////////////////////////////////////////////////////////

      Function: siteInit( )

  Description: Initialize all website stuff.

       Syntax: [SCRIPT]siteInit( statStr );[/SCRIPT]

----------------------------------------------------------------------------------------------------*/

function siteInit( statStr ) {

   

   if (document.layers) {

      document.captureEvents(Event.KEYDOWN);

      layerRef    = 'document.layers';

      styleSwitch = '';

      viewSwitch  = '"show"';

      hideSwitch  = '"hide"';

      isNS        = true;

   }

   else if ((document.getElementByID) || (document.all)) {

      layerRef    = 'document.all';

      styleSwitch = '.style';

      viewSwitch  = '"visible"';

      isIE        = true;

   }



   //if ( isIE==false) { 

	//   alert('This Application Requires Microsoft Internet Explorer Version 5.5 or Higher!');

	//   self.location.replace('default.asp');

   //}



   document.onmousedown = NoRightClick;

   document.onkeydown   = getKeycode;



}

/*--------------------------------------------------------------------------------------------------

|                              I N P U T   E V E N T   H A N D L E R S

|---------------------------------------------------------------------------------------------------*/

function NoRightClick(b)

{ if (((isIE)&&(event.button > 1))||((isNS)&&(b.which > 1))) {alert('Use the left button');return false;} }

/*--------------------------------------------------------------------------------------------------*/

function getKeycode(e) {

var theKey;



   theKey = (isNS==true) ? e.which : event.keyCode; //alert('Keycode= '+theKey);



   if (theKey==18) {return false;}  // Disable ALT key

   

}


/*////////////////////////////////////////////////////////////////////////////////////////////////////

//                          M E T A   -   F U N C T I O N S

////////////////////////////////////////////////////////////////////////////////////////////////////*/



/*------------------------------------------------------------------------------------------------

 			Show/Hide Layers Routines

-------------------------------------------------------------------------------------------------*/

function showLayer(layerID) {eval(layerRef+'["' + layerID + '"]' + styleSwitch + '.visibility= "visible"');}

function hideLayer(layerID) {eval(layerRef+'["' + layerID + '"]' + styleSwitch + '.visibility= "hidden"');}

/*--------------------------------------------------------------------------------------------------*/

function ClearError() {return true; }

/*--------------------------------------------------------------------------------------------------

      Function: loadData()

  Description: Dynamically load redundant html.

--------------------------------------------------------------------------------------------------*/

function loadData( laData, param ) {

var s = "";                                                                                               
switch (laData) {
   
   case "logo":
	  s += '<a href="index.html">';	  
	  s += '<img src="images/header.jpg" style="border:0px;position:absolute;top0px;left:0px;">';
	  s += '</a>';
	  
	  logo.innerHTML = s; 
	  
	  break;

   case "footer" :

      s +=  '<br>© Copyright 2006 Intermedia Kiosks, Inc. All Right Reserved.';

      footer.innerHTML = s;   

      break;

   case "mainbar" :
   
      /*s += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="950" height="170" name="mainbar" id="mainbar">';*/
      
	  s += '<param name="movie" value="code/buttons.swf">';

      s += '<param name="quality" value="high">';

      s += '<embed src="code/buttons.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1004" height="170">';

      s += '</embed> </object>';

      mainbar.innerHTML = s;

      break;

	case "menu" :
	  s += '<a href="expertise_retalier.html"><img src="images/expertise_u.jpg" style="border:0px;position:absolute;top0px;left:165px"';
	  s +=  'onmouseover=\'this.src=\"images/expertise_o.jpg\"\'  onmouseout=\'this.src=\"images/expertise_u.jpg\"\'>';
      s += '</a>';
	  	if(name=='expertise'){
			s+= '<a href="expertise_retalier.html"><img src="images/expertise_o.jpg" style="border:0px;position:absolute;top0px;left:165px">';
			s+= '</a>';
		}
	  
	  s += '<a href="products_applications.html"><img src="images/products_u.jpg" style="border:0px;position:absolute;top0px;left:280px"';
	  s += 'onmouseover=\'this.src=\"images/products_o.jpg\"\'  onmouseout=\'this.src=\"images/products_u.jpg\"\'>';
	  s += '</a>';
	  	if(name=='products'){
		s+= '<a href="products_applications.html"><img src="images/products_o.jpg" style="border:0px;position:absolute;top0px;left:280px">';
		s+= '</a>';
		}
	  
	  s += '<a href="support_customer.html"><img src="images/support_u.jpg" style="border:0px;position:absolute;top0px;left:395px"';
	  s += 'onmouseover=\'this.src=\"images/support_o.jpg\"\'  onmouseout=\'this.src=\"images/support_u.jpg\"\'>';
	  s += '</a>';
	  	if(name=='support'){
		s+= '<a href="support_customer.html"><img src="images/support_o.jpg" style="border:0px;position:absolute;top0px;left:395px">';
		s+= '</a>';
		}
	    
	  s += '<a href="company_aboutus.html"><img src="images/company_u.jpg" style="border:0px;position:absolute;top0px;left:510px"';
	  s += 'onmouseover=\'this.src=\"images/company_o.jpg\"\'  onmouseout=\'this.src=\"images/company_u.jpg\"\'>';
	  s += '</a>';
	  	if(name=='company'){
		s+= '<a href="company_aboutus.html"><img src="images/company_o.jpg" style="border:0px;position:absolute;top0px;left:510px">';
		s+= '</a>';
		}
	  		if (menupos=='2') {
				menu.style.top = '68px';
				menu.style.left = '0px';
			}
	  	 		
      menu.innerHTML = s;
	  
	  break;
	  
   case "submenuexpertise" :
   	var linkRetalier="expertise_retalier.html"
   	var linkCustomer="expertise_customer.html"

	  if(subname=='expertise_retalier'){
		  s += '<a href="'+linkRetalier+'" class="pig">Retalier</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkRetalier+'">Retalier</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='expertise_customers'){
		  s += '<a href="'+linkCustomer+'" class="pig">Customers</a>';
		  }else{
			  s += '<a href="'+linkCustomer+'">Customers</a>';
			  }
   	  
	  submenuexpertise.innerHTML = s; 
	  
	  break;
	  
   case "submenuproducts" :
   	var linkApplications="products_applications.html"
   	var linkSystems="products_systems.html"
   	var linkInterfaces="products_interface.html"
   	var linkTechnolgoy="products_technology.html"

  	
	  if(subname=='products_applicaitons'){
		  s += '<a href="'+linkApplications+'" class="pig">Applications</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkApplications+'">Applications</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='products_systems'){
		  s += '<a href="'+linkSystems+'" class="pig">Systems</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkSystems+'">Systems</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='products_interfaces'){
		    s += '<a href="'+linkInterfaces+'" class="pig">Interfaces</a> <span class="BodyB">|</span> ';
			}else{
				s += '<a href="'+linkInterfaces+'">Interfaces</a> <span class="BodyB">|</span> ';
				}
	  if(subname=='products_technology'){
		  s += '<a href="'+linkTechnolgoy+'" class="pig">Technology</a>';
		  }else{
			  s += '<a href="'+linkTechnolgoy+'">Technology</a>';
			  }   
   	  
	  submenuproducts.innerHTML = s; 
	  
	  break;
	  
   case "submenusupport" :
    var linkCustomer="support_customer.html"
   	var linkRequest="support_request.html"
   	var linkContact="support_contact.html"
  	
	  if(subname=='support_customer'){
		  s += '<a href="'+linkCustomer+'" class="pig">Customer Support</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkCustomer+'">Customer Support</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='support_request'){
		  s += '<a href="'+linkRequest+'" class="pig">Request Information</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkRequest+'">Request Information</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='support_contact'){
		    s += '<a href="'+linkContact+'" class="pig">Contact Information</a>';
			}else{
				s += '<a href="'+linkContact+'">Contact Information</a>';
				}
  
   	  
	  submenusupport.innerHTML = s; 
	  
	  break;
	  
	case "submenucompany" :
   	 var linkAboutUs="company_aboutus.html"
   	 var linkContact="company_contact.html"
   	 var linkPress="company_press.html"
   	 var linkCustomers="company_customers.html"
	 //var linkManagement="company_keymanagement.html"
  	
	  if(subname=='company_aboutus'){
		  s += '<a href="'+linkAboutUs+'" class="pig">About Us</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkAboutUs+'">About Us</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='company_contact'){
		  s += '<a href="'+linkContact+'" class="pig">Contact Information</a> <span class="BodyB">|</span> ';
		  }else{
			  s += '<a href="'+linkContact+'">Contact Information</a> <span class="BodyB">|</span> ';
			  }
	  if(subname=='company_press'){
		    s += '<a href="'+linkPress+'" class="pig">Press</a> <span class="BodyB">|</span> ';
			}else{
				s += '<a href="'+linkPress+'">Press</a> <span class="BodyB">|</span> ';
				}
	  if(subname=='company_customers'){
		    s += '<a href="'+linkCustomers+'" class="pig">Customers</a>';
			}else{
				s += '<a href="'+linkCustomers+'">Customers</a>';
				}
	  //if(subname=='company_keymanagement'){
		  //s += '<a href="'+linkManagement+'" class="pig">Key Management</a>';
		  //}else{
			  //s += '<a href="'+linkManagement+'">Key Management</a>';
			  //}   
   	  
	  submenucompany.innerHTML = s; 
	  
	  break;
	  
 	  
   case "contact" :
	  s += ' <table width="780" height="300" border="0"><tr><td valign="middle" align="center"><span class="Header">Intermedia Kiosks</span><br>';
      s += '<span class="Body">10715 Red Run Blvd., Suite 113F<br>Owings Mills, MD 21117<br>Phone: 443-394-6500 or 888-501-8836<br>Fax: 443-394-6628</span><br>';
	  s += '<span class="subheader"><a href="mailto:xo.request@gilbarco.com">request@gilbarco.com</a></span><br><br>';
      s += '<a href="http://www.mapquest.com/directions/main.adp?2l=3Dk03dJf/Oc=&2g=5Xs/FBr4IQk=&2pn=&2ic=31&2ex=1&src=maps&2a=10715%20Red%20Run%20Blvd&2c=Owings%20Mills&2s=MD&2z=21117-5143&2y=US" target="_blank" class="subheader">';
	  s += '<strong>Click here</strong></a><span class="Body"> for MapQuest directions from your area .</span></td></tr></table>';

	  
	  contact.innerHTML = s;   

      break;
	
	case "GoogleSearch" :
	s += '<FORM action="http://www.google.com/search" method=GET target="_blank">';
	s += '<input type=hidden name=ie value=UTF-8>';
	s += '<input type=hidden name=oe value=UTF-8>';
	s += '<TABLE bgcolor="#FFFFFF"><tr><td>';
	s += '<A HREF="http://www.google.com/">';
	s += '<IMG SRC="http://www.google.com/logos/Logo_40wht.gif"';
	s += 'border="0" ALT="Google"></A>';
    s += '</td>';
	s += '<td>';
	s += '<INPUT TYPE=text name=q size=31 maxlength=255 value="">';
	s += '<INPUT type=submit name=btnG VALUE="Google Search">';
	s += '<font size=-1>';
	s += '<input type=hidden name=domains value="www.intermediakiosks.com"><br><input type=radio name=sitesearch value=""> <span class="Body">WWW</span> <input type=radio name=sitesearch value="www.intermediakiosks.com" checked><span class="Body"> www.intermediakiosks.com</span> <br>';
	s += '</font>';
	s += '</td></tr></TABLE>';
	s += '</FORM>';
	
	GoogleSearch.innerHTML = s;
	
	break;

}
return s;
}

/*////////////////////////////////////////////////////////////////////////////////////////////////////

///				                       E N D   O F   C O D E

////////////////////////////////////////////////////////////////////////////////////////////////////*/
