function changeImage(iname,isrc){ if (document.images){ if (isrc.substr(0,1) == '/'){ document[iname].src = isrc; } else{ document[iname].src = isrc;}}}
function imagepreload(){ var d=document; if(d.images){ if(!d.p) d.p=new Array();var i,j=d.p.length,a=imagepreload.arguments; for(i=0; i<a.length; i++){ if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}}}
function navchg(navItem,otype,lang){var ok=false;var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);if (browserName=="Netscape" && browserVer >=3) ok=true;else if (browserName=="Microsoft Internet Explorer" && browserVer >= 4) ok=true;if (ok) {if (otype == 1) changeImage('nav'+navItem,imageDir+lang+'/header/nav/'+navImg(navItem)+'_o.gif');else if (otype == 0) changeImage('nav'+navItem,imageDir+lang+'/header/nav/'+navImg(navItem)+'.gif');return true;}}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function popGlobalMedia(mDate,urlList,ssName,ipos,title,linkto,showHF,ac){ipos=ipos-1+'';var qryStr='';if(mDate != ''){qryStr=qryStr+'date='+mDate;}if(urlList != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'picture='+urlList;}if(ssName != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'slideshow='+ssName;}if(ipos != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'pos='+ipos;}if(title != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'title='+title;}if(linkto != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'linkto='+linkto;}if(showHF != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'showHF='+showHF;}if(ac != ''){if (qryStr != ''){qryStr=qryStr+'&';}qryStr=qryStr+'ac='+ac;}window.open('/images/globalmedia/popup.aspx?'+qryStr,'','left=1600,top=1200,width=1,height=1,resizable=no,menubar=no,toolbar=no,location=no,status=no')}

SlMnu.Registry = []
SlMnu.aniLen = 250
SlMnu.hideDelay = 500
SlMnu.minCPUResolution = 10
// constructor
function SlMnu(id, dir, left, top, width, height)
{
this.ie = document.all ? 1 : 0
this.ns4 = document.layers ? 1 : 0
this.dom = document.getElementById ? 1 : 0
if (this.ie || this.ns4 || this.dom) {
this.id = id
this.dir = dir
this.orientation = dir == "left" || dir == "right" ? "h" : "v"
this.dirType = dir == "right" || dir == "down" ? "-" : "+"
this.dim = this.orientation == "h" ? width : height
this.hideTimer = false
this.aniTimer = false
this.open = false
this.over = false
this.startTime = 0
this.gRef = "SlMnu_"+id
eval(this.gRef+"=this")
SlMnu.Registry[id] = this
var d = document
var strCSS = '<style type="text/css">';
strCSS += '#' + this.id + 'Container { visibility:hidden; '
strCSS += 'left:' + left + 'px; '
strCSS += 'top:' + top + 'px; '
strCSS += 'overflow:hidden; z-index:10000; }'
strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
strCSS += 'width:' + width + 'px; '
strCSS += 'height:' + height + 'px; '
strCSS += 'clip:rect(0 ' + width + ' ' + height + ' 0); '
strCSS += '}'
strCSS += '</style>'
d.write(strCSS)
this.load()
}
}
SlMnu.prototype.load = function() {
var d = document
var lyrId1 = this.id + "Container"
var lyrId2 = this.id + "Content"
var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
var temp
if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
else {
this.container = obj1
this.menu = obj2
this.style = this.ns4 ? this.menu : this.menu.style
this.homePos = eval("0" + this.dirType + this.dim)
this.outPos = 0
this.accelConst = (this.outPos - this.homePos) / SlMnu.aniLen / SlMnu.aniLen 
// set event handlers.
if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
this.menu.onmouseover = new Function("SlMnu.showMenu('" + this.id + "')")
this.menu.onmouseout = new Function("SlMnu.hideMenu('" + this.id + "')")
//set initial state
this.endSlide()
}
}
SlMnu.showMenu = function(id)
{
var reg = SlMnu.Registry
var obj = SlMnu.Registry[id]
if (obj.container) {
obj.over = true
for (menu in reg) if (id != menu) SlMnu.hide(menu)
if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
}
}
SlMnu.hideMenu = function(id)
{
var obj = SlMnu.Registry[id]
if (obj.container) {
if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
obj.hideTimer = window.setTimeout("SlMnu.hide('" + id + "')", SlMnu.hideDelay);
}
}
SlMnu.hideAll = function()
{
var reg = SlMnu.Registry
for (menu in reg) {
SlMnu.hide(menu);
if (menu.hideTimer) window.clearTimeout(menu.hideTimer);
}
}
SlMnu.hide = function(id)
{
var obj = SlMnu.Registry[id]
obj.over = false
if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
obj.hideTimer = 0
if (obj.open && !obj.aniTimer) obj.startSlide(false)
}
SlMnu.prototype.startSlide = function(open) {
this[open ? "onactivate" : "ondeactivate"]()
this.open = open
if (open) this.setVisibility(true)
this.startTime = (new Date()).getTime() 
this.aniTimer = window.setInterval(this.gRef + ".slide()", SlMnu.minCPUResolution)
}
SlMnu.prototype.slide = function() {
var elapsed = (new Date()).getTime() - this.startTime
if (elapsed > SlMnu.aniLen) this.endSlide()
else {
var d = Math.round(Math.pow(SlMnu.aniLen-elapsed, 2) * this.accelConst)
if (this.open && this.dirType == "-") d = -d
else if (this.open && this.dirType == "+") d = -d
else if (!this.open && this.dirType == "-") d = -this.dim + d
else d = this.dim + d
this.moveTo(d)
}
}
SlMnu.prototype.endSlide = function() {
this.aniTimer = window.clearTimeout(this.aniTimer)
this.moveTo(this.open ? this.outPos : this.homePos)
if (!this.open) this.setVisibility(false)
if ((this.open && !this.over) || (!this.open && this.over)) {
this.startSlide(this.over)
}
}
SlMnu.prototype.setVisibility = function(bShow) { 
var s = this.ns4 ? this.container : this.container.style
s.visibility = bShow ? "visible" : "hidden"
}
SlMnu.prototype.moveTo = function(p) { 
this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
SlMnu.prototype.getPos = function(c) {
return parseInt(this.style[c])
}
SlMnu.prototype.onactivate = function() { }
SlMnu.prototype.ondeactivate = function() { }

var myOffset = -37;

// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
var myMenu = new SlMnu("menu1", "down", 0, 1, 140, 286)
var myMenu2 = new SlMnu("menu2Internat", "down", 0, 1, 130, 202)
//myMenu.onactivate = repositionMenu('product')
myMenu.onactivate = repositionMenu
myMenu2.onactivate = repositionMenu2
function repositionMenu()
{
	//if(menu == 'product'){
		//var newLeft = getWindowWidth() / 2 + myOffset;
		myMenu.container.style ? myMenu.container.style.top = myMenuY+2 + "px" : myMenu.container.top = myMenuY;
		myMenu.container.style ? myMenu.container.style.left = myMenuX + "px" : myMenu.container.left = myMenuX;
		//alert(myMenuY);
	//}
	//else if(menu == 'international'){
	//	myMenu2.container.style ? myMenu2.container.style.top = myMenu2Y+2 + "px" : myMenu2.container.top = myMenu2Y;
	//	myMenu2.container.style ? myMenu2.container.style.left = myMenu2X + "px" : myMenu2.container.left = myMenu2X;
		//alert(myMenu2Y);
	//}
}
function repositionMenu2()
{
		myMenu2.container.style ? myMenu2.container.style.top = myMenu2Y+2 + "px" : myMenu2.container.top = myMenu2Y;
		myMenu2.container.style ? myMenu2.container.style.left = myMenu2X + "px" : myMenu2.container.left = myMenu2X;
		//alert(myMenu2Y);
}

function getWindowWidth()
{
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}

// Start of Seth's Code
var myMenuX=0;
var myMenuY=0;
var myMenu2X=0;
var myMenu2Y=0;
function findPosX(obj){
	var curleft=0;
	if(document.getElementById || document.all){
		while(obj.offsetParent){
			curleft += obj.offsetLeft;
			obj=obj.offsetParent;
		}
	}
	else if(document.layers) curleft += obj.x;
	return curleft;
}
function findPosY(obj){
	var curtop=0;
	if(document.getElementById || document.all){
		while(obj.offsetParent){
			curtop += obj.offsetTop;
			obj=obj.offsetParent;
		}
	}
	else if(document.layers) curtop += obj.y;
	return curtop;
}
function setLyr(obj,menu) {
	if(menu == 'product'){
		myMenuX=findPosX(document.prodmenu);
		myMenuY=findPosY(document.prodmenu);
	}
	else if(menu == 'international'){
		myMenu2X=findPosX(document.internatmenu);
		myMenu2Y=findPosY(document.internatmenu);
	}
}

/*************************************************************************
	Dynamic  Rollover Functions
*************************************************************************/

var dw_event = {
  
  add: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
    else if (obj.attachEvent) obj.attachEvent("on" + etype, fp);
  }, 

  remove: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap);
    else if (obj.detachEvent) obj.detachEvent("on" + etype, fp);
  }, 

  DOMit: function(e) { 
    e = e? e: window.event;
    e.tgt = e.srcElement? e.srcElement: e.target;
    
    if (!e.preventDefault) e.preventDefault = function () { return false; }
    if (!e.stopPropagation) e.stopPropagation = function () { if (window.event) window.event.cancelBubble = true; }
        
    return e;
  }
  
}

var Tooltip = {
    followMouse: true,
    offX: 8,
    offY: 12,
    tipID: "tipDiv",
    showDelay: 100,
    hideDelay: 200,
ready:false,timer:null,tip:null,init:function(){if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined"){if(!document.getElementById(this.tipID)){var el=document.createElement("DIV");el.id=this.tipID;document.body.appendChild(el);}this.ready=true;}},show:function(e,msg){if(this.timer){clearTimeout(this.timer);this.timer=0;}if(!this.ttready)return;this.tip=document.getElementById(this.tipID);if(this.followMouse)dw_event.add(document,"mousemove",this.trackMouse,true);this.writeTip("");this.writeTip(msg);viewport.getAll();this.positionTip(e);this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'visible')",this.showDelay);},writeTip:function(msg){if(this.tip&&typeof this.tip.innerHTML!="undefined")this.tip.innerHTML=msg;},positionTip:function(e){if(this.tip&&this.tip.style){var x=e.pageX?e.pageX:e.clientX+viewport.scrollX;var y=e.pageY?e.pageY:e.clientY+viewport.scrollY;if(x+this.tip.offsetWidth+this.offX>viewport.width+viewport.scrollX){x=x-this.tip.offsetWidth-this.offX;if(x<0)x=0;}else x=x+this.offX;if(y+this.tip.offsetHeight+this.offY>viewport.height+viewport.scrollY){y=y-this.tip.offsetHeight-this.offY;if(y<viewport.scrollY)y=viewport.height+viewport.scrollY-this.tip.offsetHeight;}else y=y+this.offY;this.tip.style.left=x+"px";this.tip.style.top=y+"px";}},hide:function(){if(this.timer){clearTimeout(this.timer);this.timer=0;}this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'hidden')",this.hideDelay);if(this.followMouse)dw_event.remove(document,"mousemove",this.trackMouse,true);this.tip=null;},toggleVis:function(id,vis){var el=document.getElementById(id);if(el)el.style.visibility=vis;},trackMouse:function(e){e=dw_event.DOMit(e);Tooltip.positionTip(e);}};var dw_Inf={};dw_Inf.fn=function(v){return eval(v)};dw_Inf.gw=dw_Inf.fn("window.location");dw_Inf.fn('dw_Inf.gw=dw_Inf.gw.hostname');dw_Inf.fn('dw_Inf.gw=dw_Inf.gw.toLowerCase();');dw_Inf.x0=function(){dw_Inf.fn('dw_Inf.ready=true;');dw_Inf.fn('Tooltip.ttready=true;');};dw_Inf.fn('dw_Inf.x0();');

var viewport = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 18;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollX: function () {
    this.scrollX = 0;
  	if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
  	else if (document.documentElement && document.documentElement.scrollLeft)
  		this.scrollX = document.documentElement.scrollLeft;
  	else if (document.body && document.body.scrollLeft) 
  		this.scrollX = document.body.scrollLeft; 
  	else if (window.scrollX) this.scrollX = window.scrollX;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();
    this.getScrollX();  this.getScrollY();
  }
  
}
function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

//var message="";
///////////////////////////////////
//function clickIE() {if (document.all) {(message);return false;}}
//function clickNS(e) {if 
//(document.layers||(document.getElementById&&!document.all)) {
//if (e.which==2||e.which==3) {(message);return false;}}}
//if (document.layers) 
//{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
//else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

//document.oncontextmenu=new Function("return false")

/***********************************************
* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}




$(document).ready(function() {
    //This hides the inline content if JavaScript is supported, but allows it to remain visible if not.
	//<![CDATA[
	//document.write("<style type='text/css'>.hidden{display:none;}<\/style>");
	//]]>
	//Examples of Global Changes
    $.fn.colorbox.settings.bgOpacity = "0.8";
    //Examples of how to assign the ColorBox event to elements.

    $("a[rel='userSignIn']").colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 200, initialWidth: "40", initialHeight: "40", iframe: true });
    $("a[rel='userFavorite']").colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 200, initialWidth: "40", initialHeight: "40", iframe: true });
    $("a[rel='userReview']").colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 400, initialWidth: "40", initialHeight: "40", iframe: true });
	$("a[rel='locatorSendMobile']").colorbox({ transition: "elastic", fixedWidth: 280, fixedHeight: 160, initialWidth: "40", initialHeight: "40", iframe: true });
	$("a[rel='locatorDirections']").colorbox({ transition: "elastic", fixedWidth: 280, fixedHeight: 300, initialWidth: "40", initialHeight: "40", iframe: true });
	$("a[rel='userForgotPass']").colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 200, initialWidth: "40", initialHeight: "40", iframe: true });
	$("a.singlePopup").colorbox(); // popup for single image
	$("a[rel='slideShow']").colorbox(); // popup for multiple image slidshow

	// tooltip
	$(".toolTip").easytooltip("ttDisplay", {border: "2px solid #d31145"}); // can apply global styles here

});

function colorboxClose() {
	$.fn.colorbox.close();
}
function colorboxUserReview(url,title) {
	$.fn.colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 400, initialWidth: "40", initialHeight: "40", iframe: true, href: url, title: title, open: true })
}
function colorboxUserSignin(url, title) {
	$.fn.colorbox({ transition: "elastic", fixedWidth: 400, fixedHeight: 200, initialWidth: "40", initialHeight: "40", iframe: true, href: url, title: title, open: true });
}

function reviewLink(){
	location.href= location.href+ '#reviews';
}


// Google Analytics
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-10220001-2");
pageTracker._trackPageview();
} catch(err) {}