<!--

/* - - - - - - - - - - - - - - - - - - Macromedia Functions - - - - - - - - - - - - - - - - - - */
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}
	
	//06122006 / SRC / created to decrease QuickShop page size and improve performance
	function MM_openBrWindowQuickShop(theProductID, theMenuID) { 
	  window.open('showitem.asp?ProductId=' + theProductID + '&menuId=' + theMenuID + '&template=popupDetail&menuId=&withLinks=0','detail','scrollbars=yes,width=550,height=400');
	}
	
	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);
	
	function MM_showHideLayers() { //v6.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
	}
	
	function MM_initTimelines() { //v4.0
		//MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
		var ns = navigator.appName == "Netscape";
		var ns4 = (ns && parseInt(navigator.appVersion) == 4);
		var ns5 = (ns && parseInt(navigator.appVersion) > 4);
		var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
		document.MM_Time = new Array(1);
		document.MM_Time[0] = new Array(0);
		document.MM_Time["Timeline2"] = document.MM_Time[0];
		document.MM_Time[0].MM_Name = "Timeline2";
		document.MM_Time[0].fps = 15;
		document.MM_Time[0].lastFrame = 0;
		for (i=0; i<document.MM_Time.length; i++) {
			document.MM_Time[i].ID = null;
			document.MM_Time[i].curFrame = 0;
			document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
		}
	}
	
	function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
		  var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
		  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
		  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
		  if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
			if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
				if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
				if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
				if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
			features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
		  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
		  if (window["popupWindow"] == null) window["popupWindow"] = new Array();
		  var wp = popupWindow.length;
		  popupWindow[wp] = window.open(theURL,winName,features);
		  if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
		  if (document.all || document.layers || document.getElementById) {
			if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
			if (alwaysOnTop && alwaysOnTop != "") {
				ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
				popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
			if (autoCloseTime && autoCloseTime > 0) {
				popupWindow[wp].document.body.onbeforeunload = function() {
					if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
					window.onbeforeunload = null;	}  
				autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
			window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
		  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
		}
	
	function YY_checkform() { //v4.71
	//copyright (c)1998,2002 Yaromat.com
	  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
	  for (i=1; i<a.length;i=i+4){
		if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
		o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
		o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
		v=o.value;t=a[i+2];
		if (o.type=='text'||o.type=='password'||o.type=='hidden'){
		  if (r&&v.length==0){err=true}
		  if (v.length>0)
		  if (t==1){ //fromto
			ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
		  } else if (t==2){
			rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
		  } else if (t==3){ // date
			ma=a[i+1].split("#");at=v.match(ma[0]);
			if(at){
			  cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
			  dte=new Date(cy,cm,cd);
			  if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
			}else{err=true}
		  } else if (t==4){ // time
			ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
		  } else if (t==5){ // check this 2
				if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
				if(!o1.checked){err=true}
		  } else if (t==6){ // the same
				if(v!=MM_findObj(a[i+1]).value){err=true}
		  }
		} else
		if (!o.type&&o.length>0&&o[0].type=='radio'){
			  at = a[i].match(/(.*)\[(\d+)\].*/i);
			  o2=(o.length>1)?o[at[2]]:o;
		  if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
		  if (t==2){
			oo=false;
			for(j=0;j<o.length;j++){oo=oo||o[j].checked}
			if(!oo){s+='* '+a[i+3]+'\n'}
		  }
		} else if (o.type=='checkbox'){
		  if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
		} else if (o.type=='select-one'||o.type=='select-multiple'){
		  if(t==1&&o.selectedIndex/1==0){err=true}
		}else if (o.type=='textarea'){
		  if(v.length<a[i+1]){err=true}
		}
		if (err){s+='* '+a[i+3]+'\n'; err=false}
	  }
	  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
	  document.MM_returnValue = (s=='');
	}
	
	
/* - - - - - - - - - - - - - - - - - - P7 drop down Functions - - - - - - - - - - - - - - - - - - */

	function P7_JumpMenuGo(selName,restore){ //v1.1 Beta Version by Project Seven
	  var selObj = MM_findObj(selName); if (selObj) P7_JumpMenu(selObj,restore);
	}


	function P7_JumpMenu(selObj,restore){ //v1.4 by Project Seven
		var theFullString = selObj.options[selObj.selectedIndex].value;
		if (restore) selObj.selectedIndex=0;
		var theLength = theFullString.length;
		var endPos = theFullString.lastIndexOf("~");
		var theUrl, theTarget, theParent;
		if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
		else {theUrl = theFullString;}
		endPos++
		if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
		else {theTarget = "window:Main";}
		if (theTarget == "window:New") {window.open(theUrl);}
		else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
		else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
	}


	function P7_Snap() { //v2.67 by PVII
	 var g,x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,tw,q0,xx,yy,w1,pa='px',args=P7_Snap.arguments;a=parseInt(a);
	 if(document.layers||window.opera){pa='';}for(k=0;k<(args.length);k+=4){
	 if((g=MM_findObj(args[k]))!=null){if((el=MM_findObj(args[k+1]))!=null){
	 a=parseInt(args[k+2]);b=parseInt(args[k+3]);x=0;y=0;ox=0;oy=0;p="";tx=1;
	 da="document.all['"+args[k]+"']";if(document.getElementById){
	 d="document.getElementsByName('"+args[k]+"')[0]";if(!eval(d)){
	 d="document.getElementById('"+args[k]+"')";if(!eval(d)){d=da;}}
	 }else if(document.all){d=da;}if(document.all||document.getElementById){while(tx==1){
	 p+=".offsetParent";if(eval(d+p)){x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
	 }else{tx=0;}}ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);tw=x+ox+y+oy;
	 if(tw==0||(navigator.appVersion.indexOf("MSIE 4")>-1&&navigator.appVersion.indexOf("Mac")>-1)){
	  ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);}else{
	  w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
	  x=document.body.scrollLeft+event.clientX+bx;y=document.body.scrollTop+event.clientY;}}
	 }else if(document.layers){x=g.x;y=g.y;q0=document.layers,dd="";for(var s=0;s<q0.length;s++){
	  dd='document.'+q0[s].name;if(eval(dd+'.document.'+args[k])){x+=eval(dd+'.left');y+=eval(dd+'.top');
	  break;}}}e=(document.layers)?el:el.style;xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
	 if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
	  xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);}
	 e.left=xx+pa;e.top=yy+pa;}}}
	}
	
	function P7_autoLayers() { //v1.5 by PVII
	 var g,b,k,f,u,k,j,args=P7_autoLayers.arguments,a=parseInt(args[0]);if(isNaN(a))a=0;
	 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(u=0;u<10;u++){
	 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
	 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){
	 if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;hideDivSelects(a,g);b.visibility="visible";f=false;
	 for(j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}
	 if(!f){p7c[a][p7c[a].length++]=args[k];}}}
	}
	
	function P7_hideDiv(evt) { //v1.3 by PVII
	 var b,relT,mT=false; 
	 if(document.layers){b=evt.target;if(b.p7aHide){
	  b.visibility="hidden";}else{routeEvent(evt);}
	 }else if(document.all&&!window.opera){b=event.srcElement;
	  while(b!=null){if(b.tagName=="DIV" && b.p7ahD){mT=true;break;}b=b.parentElement;}
	  if(!b.contains(event.toElement)){b.style.visibility="hidden";}
	 }else if(document.getElementById){b=evt.currentTarget;relT=evt.relatedTarget;
	  while(relT!=null){if(b==relT){mT=true;break;}
	  relT=relT.parentNode;}if(!mT){b.style.visibility="hidden";}}
	}
	
	function P7_autoHide() { //v1.3 by PVII
	 var i,g,args=P7_autoHide.arguments;
	 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){
	  g.p7aHide=true;if(document.layers){
	  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}
	}

/* - - - - - - - - - - - - - - - - - - Custom Functions - - - - - - - - - - - - - - - - - - */
	
function switchCountry(country, type) {
		var url;
		var newUrl = "";
		var subDomain = "";
		var newDomain = "";
		var ssl = "";
		var country;
		var ySubStrValue = 7;
		
		//get the current href location
		url = window.location;
		url = url.toString();
		
		// get script url
		x = url.indexOf('.com/');
		if (x>0){ newUrl = url.substr(x+5);}
		x = url.indexOf('.ca/'); 
		if (x>0){ newUrl = url.substr(x+4);}
		x = url.indexOf('.com.au/'); 
		if (x>0){ newUrl = url.substr(x+8);}
			
		// ssl
		if (url.match('https')!=null){
			ssl="s";
			ySubStrValue = 8
			}
	
		if (url.match('192.168.2.')!=null){
			subDomain = "www."
		} else if(url.match('://#')!=null) {
			subDomain = '';
		} else {
			// get current subdomain for devs,test,etc
			y = url.substr(ySubStrValue);
			y = y.split('.');
			subDomain = y[0]+'.';
		}
		if(type == "sub") {
			if(newUrl == '' || newUrl.indexOf('?') == 0)
				newUrl = 'sub/index.asp' + newUrl;
			else
				newUrl = 'sub/' + newUrl;
		}
			
		switch(country) {
			case 'us'	: path = 'http'+ssl+'://'+subDomain+'.com/'+newUrl; break;
			//case 'ca'	: path = 'http'+ssl+'://'+subDomain+'.ca/'+newUrl; break;
			case 'ca'	: path = 'http'+ssl+'://'+subDomain+'.ca/'+newUrl; break;
			//case 'au'	: path = 'http'+ssl+'://'+subDomain+'.com.au/'+newUrl; break;			
			case 'au'	: path = 'http'+ssl+'://'+subDomain+'.com.au/'+newUrl; break;			
			default	: path = 'http'+ssl+'://'+subDomain+'.com/'+newUrl;
		}
		window.location = path;
	}		
	function generatePulldown() {
		
		var loc = new String(window.location);
		//if(loc.indexOf('.ca') > -1)
		x = loc.indexOf('.com/');
		if (x>0){ arrayID = 0;}
		x = loc.indexOf('.ca/'); 
		if (x>0){ arrayID = 1;}
		x = loc.indexOf('.com.au/'); 
		if (x>0){ arrayID = 2;}
		x = loc.indexOf('.co.uk/'); 
		if (x>0){ arrayID = 3;}

		//if(loc.indexOf('#.ca') > -1)
		//	arrayID = 1;
		//else
		//	arrayID = 0;
		
		countryIds = Array('us', 'ca', 'au','uk');
		names = Array('United States', 'Canada', 'Australia','United Kingdom');
		
		// Remove the current country from the array
		//------------------------------------------
		countryIds.splice(arrayID, 1);
		names.splice(arrayID, 1);
		
		// Print the country dropdown
		//---------------------------
		for(var i=0; i<countryIds.length; i++) {
			document.write("<p class=\"noSub\"><a ");
			
			// Only exlude the bottom border from the last item in the menu
			//-------------------------------------------------------------
			if(i == countryIds.length-1)
				document.write("class=\"no_border\" ");
				
			document.write("href=\"javascript:switchCountry('" + countryIds[i] + "')\">" + names[i] + "</a></p><p><a href=\"javascript:switchCountry('" + countryIds[i] + "','sub')\">" + names[i] + "</a></p>");
		}
	}
		
	function countryMain() {
		var loc = new String(window.location);
		//if(loc.indexOf('international.ca') > -1)
		//if(loc.indexOf('.ca') > -1)
		//	countryId = 'ca';
		//else
		//	countryId = 'us';
			
		x = loc.indexOf('.com/');
		if (x>0){ countryId = 'us';}
		x = loc.indexOf('.ca/'); 
		if (x>0){ countryId = 'ca';}
		x = loc.indexOf('.com.au/'); 
		if (x>0){ countryId = 'au';}
			
		document.write('<img id="countryAnchor" name="countryAnchor" src="/images/common_graphics/topnav/' + countryId + '.gif" onmouseover="showDropDown(this.id, \'countryLayer\', 0, \'bottom\')" onmouseout="closeMenu(event, 0)">');
		
	}
	
	function goTo(href) {
		if(href.length > 0)
			window.location = href;
	}
	
	function init(){
		// do nothing. 
		
		/* 
		
		This is a holder function executed at the end of a page. 
		Setting it empty here allows us to set a function in the body and have it execute instead of this empty function.
		
		*/
	}

	/* 
	 * Call on onmouseout events.  When passed the P7_storageID, it will close the stored views the cursor didn't
	 * land on after the mouseout until it finds the mouse on a stored view. Will also only close the layers
	 * specified in the order specified.
	 * Parameters: (ex, [P7_storageID1, P7_storageID2, ...])
	 */
	function closeMenu(e){
		var e,t,reltg,obj,i,j,k,args=closeMenu.arguments;
 		if(!e){e=window.event;}obj=(window.event)?e.srcElement:e.target;
		t=reltg=(e.toElement)?e.toElement:e.relatedTarget;while(t!=null&&t.tagName!='BODY'){
		if(t==obj){	return;}t=t.parentNode;}if(document.p7setc&&args.length>1){for(i=1;i<args.length;i++){
		k=parseInt(args[i]);for(j=0;j<p7c[k].length;j++){t=reltg;while(t!=null&&t.tagName!='BODY'){
		if(t.id==p7c[k][j]){return;}t=t.parentNode;}}P7_autoLayers(k);showDivSelects(k);}}MM_swapImgRestore();
	}
	
	/* 
	 *  Implements a workaround for IE6 browsers so the dropdown menus work properly.
	 */
	function dropdown_IE6_fix(name){
		var tbl = MM_findObj(name);
		if(tbl) {
			tbl.style.display	= 'block';
			tbl.style.width		= tbl.parentNode.offsetWidth+'px';
			tbl.style.display	= 'none';
		}
	}
	
	/* 
	 *  Attaches a dropdownmenu to an element.
	 *  showDropDown(element1_id, element2_id, level, ['bottom' | 'right'])
	 *
	 *  Requirements: element must have 'id' property
	 */
	function showDropDown(menu1, menu2, level, location, xadd, yadd) {
		var obj1 = MM_findObj(menu1);
		var xpos, ypos;
		
		if(obj1) {
			dropdown_IE6_fix('tbl_dd_' + menu2);
			switch(location) {
				case 'bottom'	:	xpos = 0;
									ypos = obj1.offsetHeight;
									break;
				default			:	xpos = obj1.offsetWidth;
									ypos = 0;
									break;
			}
			
			if(xadd)
				xpos += xadd;
			if(yadd)
				ypos += yadd;
				
			P7_Snap(obj1.id, menu2, xpos, ypos);
			P7_autoLayers(level, menu2);		
		}
	}
	
	/* 
	 * When called, it will set the display of html elements to either block or none depending on the arguments passed.
	 * Parameters: (HTML_ELEMENT_ID/NAME, show/hide)
	 * example ('tableId1', 'show', 'tableId2', 'hide')
	 */
	function setDisplay() {
		var obj,args=setDisplay.arguments;
		for(var i=0;i<args.length-1; i++) {
			if((obj = MM_findObj(args[i]))) {
				if(args[i+1] == 'hide')
					obj.style.display='none';
				else if(args[i+1] == 'show')
					obj.style.display='block';
			}
		}
	}
	
	/* 
	 * When called, it will set the display of html elements to either block or none depending on the arguments passed.
	 * Parameters: (HTML_ELEMENT_ID/NAME, show/hide)
	 * example ('tableId1', 'show', 'tableId2', 'hide')
	 */
	function LP_show(tableName) {
		var obj, lastTable;
		obj = MM_findObj(tableName);
		objLast = MM_findObj(document.LP_lastTable);
		if(obj && objLast && obj != objLast) {
			obj.style.display = 'block';
			objLast.style.display = 'none';
			document.LP_lastTable = tableName;
		}
	}

	/* 
	 * When called, it will randomly set the display of all but three html elements to none.
	 * Html elements that must be displayed together must have an id/name with '_num' attached.
	 * Parameters: (HTML_ELEMENT_ID/NAME)
	 * example ('tableId1', 'tableId2', 'tableId3', 'tableId4_1', 'tableId4_2')
	 */
	function showThree() {
		// Must add checks to ensure that when a 2 or 1 block is removed that there is a proper counterpart
		// remaining to fill the block of 3.
		
		var num, i, j, k, r, first=false,firstOf='', count, over, tds, rem, node, args=showThree.arguments;
		tds = new Array();
		rem = new Array();
		for(i=0;i<args.length;i++)
			tds[i] = args[i];
		for(i=0;i<3;i++) {
			r = Math.floor(Math.random()*tds.length);
			if(tds[r].indexOf('_') > -1) {
				over = false;
				num = tds[r].split('_');
				count = 0;
				for (j=0;j<tds.length;j++) {
					if(tds[j].indexOf(num[0]) > -1) {
						count++;
					}
				}
				if(i+count <= 3) {
					i += count-1;
				}
				else {
					over = true;
					i--;
				}
				for (j=0;j<tds.length;j++) {
					if(tds[j].indexOf(num[0]) > -1) {
						if(over) {
							for(k=j;k<j+count;k++) {
								rem[rem.length] = tds[k];
							}
						}
						tds=rSplice(tds,j,count);
						break;
					}
				}
			}
			else {
				tds=rSplice(tds,r);
			}
			if(tds.length == 0) {
				tds = new Array();
				rem = new Array();
				for(i=0;i<args.length;i++)
					tds[i] = args[i];
				i = -1;
			}
		}
		for(j=0;j<tds.length;j++) {
			node=MM_findObj(tds[j]);
			node.parentNode.removeChild(node);
		}
		for(j=0;j<rem.length;j++) {
			node=MM_findObj(rem[j]);
			node.parentNode.removeChild(node);
		}
		for(j=0;j<args.length;j++) {
			if(!MM_findObj(args[j]))
				continue;

			if(MM_findObj(args[j]).style.display != 'none') {					
				if(args[j].indexOf('_') > -1) {
					num = args[j].split('_');
					if(firstOf == num[0])
						continue;
					firstOf = num[0];
				}
				if(!first) {
					first = true;
					continue;
				}
				MM_findObj(args[j]).className = 'NSBLeftBorder';
			}
		}
	}
	
	function rSplice(ar, index, count) {
		var nAr = new Array();
		if(isNaN(count)) count = 1;
		for(var i=0;i<ar.length;i++) { 
			if(i==index) {
				i+=count-1;
				continue;
			}
			nAr[nAr.length]=ar[i];
		}
		return nAr;
	}
	
	function addOnLoad(func) {
		var args = addOnLoad.arguments;
		
		var oldLoad = window.onload;
		window.onload = function()
			{
			if(oldLoad != null)
				oldLoad();
				func(args[1]);
			}
	}
	function addOnResize(func) {
		var oldResize = window.onresize;
		window.onresize = function()
			{
			if(oldResize != null)
				oldResize();
			func();
			}
	}


	function addToFunction(func1, func2) {
		var newFunc1, newFunc2, newFunc;
		var index1, index2;

		newFunc1 = eval(func1 + '.toString()');
		index1 = newFunc1.indexOf('{');
		index2 = newFunc1.lastIndexOf('}');
		newFunc1 = newFunc1.substr(index1, index2);

		newFunction = '{\n' + newFunc1 + '\n' + func2 + '();\n}';
		eval(func1 + ' = function() ' + newFunction);
	}
	
	function ICNav_mouseOver(){
			var obj = MM_findObj('main_ic_nav');
			if(obj) {
				if(obj.mouseOver)
					obj.mouseOver();
			}
	}

	function isMouseOut(e){
		var e,t,reltg,obj;
 		if(!e){e=window.event;}obj=(window.event)?e.srcElement:e.target;
		t=reltg=(e.toElement)?e.toElement:e.relatedTarget;while(t!=null&&t.tagName!='BODY'){
		if(t==obj){	return false;}t=t.parentNode;}
		return true;
	}

	function icsnHighlight(e,s){
		e.className = 'icSectionNav_Hover' //'#ECF1EF'
		window.status = s;
	}
	function icsnUnhighlight(e){
		e.className = 'icSectionNav_Text';
		window.status = '';
	}
	function icssnHighlight(e,s){
		e.className = 'icSectionSubNav_Hover' //'#ECF1EF'
		window.status = s;
	}
	function icssnUnhighlight(e){
		e.className = 'icSectionSubNav_Text';
		window.status = '';
	}
	
	function limitTextLen(field,cntfield,maxlimit) {
		if (field.value.length > maxlimit){
			// if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
			// otherwise, update 'characters left' counter
		} else {
			x = maxlimit - field.value.length
			cntfield.value = x.toString() + ' characters available';
		}
	}
	function limitTextLenDiv(field,divName,maxlimit) {
		if (field.value.length > maxlimit){
			// if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
			// otherwise, update 'characters left' counter
		} else {
			x = maxlimit - field.value.length
			divWrite(divName, x.toString() + ' characters available');
		}
	}
	//*********//
	function limitTextLenSpa(field,cntfield,maxlimit) {
		if (field.value.length > maxlimit){
			// if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
			// otherwise, update 'characters left' counter
		} else {
			x = maxlimit - field.value.length
			cntfield.value = x.toString() + ' caracteres disponibles';
		}
	}	
	function limitTextLenDivSpa(field,divName,maxlimit) {
		if (field.value.length > maxlimit){
			// if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
			// otherwise, update 'characters left' counter
		} else {
			x = maxlimit - field.value.length
			divWrite(divName, x.toString() + ' caracteres disponibles');
		}
	}
	//*********//
	function divWrite(n,str){
		e=MM_findObj(n);
		e.innerHTML = str
	}


	
	/* 
	 * Get absolute left, top, right, and bottom of an html element
	 * example: getOffset(htmlObj)
	 * - Returns object r: r.l, r.t, r.r, r.b (left, right, top, and bottom; respectively)
	 */
	function getOffset(o){
		for(var r = {l: o.offsetLeft, t: o.offsetTop, r: o.offsetWidth, b: o.offsetHeight};o = o.offsetParent; r.l += o.offsetLeft, r.t += o.offsetTop);
		r.r += r.l;
		r.b += r.t;
		return r;
	}
	
	/* 
	 * Hides all select form elements in the document that the given object is overlapping
	 * Saves all hidden objects to an array of a given index that can be displayed again by calling showDivSelects(index)
	 * Parameters: (index Number, obj htmlObject)
	 * example: hideDivSelects(0, htmlObj)
	 */
	function hideDivSelects(index, obj) {
		var oPos = getOffset(obj);
		var fPos, i, j, k, found, intersect=false;
		if(!document.divSelects) {
			document.divSelects = Array();
			for(i=0;i<10;i++) {document.divSelects[i] = new Array();}
		}
			
		for(i=0; i < document.forms.length; i++) {
			for(j=0; j < document.forms[i].elements.length; j++) {
				formElement = document.forms[i].elements[j];
				if(formElement.type == 'select-one' || formElement.type == 'select-multiple') {
					fPos = getOffset(formElement);
					if(fPos.l && fPos.t && fPos.b && fPos.r) {
						if((oPos.l == fPos.l && oPos.t == fPos.t) || (oPos.l > fPos.l ? oPos.l <= fPos.r : fPos.l <= oPos.r) && (oPos.t > fPos.t ? oPos.t <= fPos.b : fPos.t <= oPos.b)) {
							found = false;
							intersect = true;
							formElement.style.visibility = 'hidden';
							for(k=0; k < document.divSelects[index].length; k++) {
								if(document.divSelects[index][k] == formElement)
									found = true;
							}
							if(!found)
								document.divSelects[index][document.divSelects[index].length] = formElement;
						}
					}
				}
			}
		}
		if(!intersect)
			showDivSelects(index);
	}
	
	/* 
	 * Displays all select form elements that were hidden by the call to hideDivSelects with the same index
	 * Parameters: (index Number)
	 * example: showDivSelects(0)
	 */
	function showDivSelects(index) {
		if(document.divSelects) {
			for(var i=0; i < document.divSelects[index].length; i++)
				document.divSelects[index][i].style.visibility = 'visible';
			document.divSelects[index].length = 0;
		}
	}
	
	/* 
	 * Set's the Company Left nav to display the appropriate section and highlight the sub area given
	 * Parameters: (mainNavElement, subNavElement)
	 
	 */
	function setLeftNav(navMain, navSub) {
		var text;
		var objMain = MM_findObj("leftnav_" + navMain);
		var objSub = MM_findObj("subnav_" + navSub);
		var objImg = MM_findObj("leftNav_image");
		if(objMain)
			objMain.style.display = "block";
		if(objSub) {
			objSub.style.background = '#7C8D6F';
			objSub.parentNode.style.background = '#F4F3F2';
		}
		if(objImg)
			objImg.src = "/images/leftnavs/thumbnails/" + navMain + ".gif";
	}
	
	/* 
	 * Set's the Swatch Tooltip over the about face swatches
	 * Parameters: (xVal, yVal, productId, title)
	 * example: setLeftNav(500, 300, '1720', 'fair')
	 */
	function showSwatchInfo(xVal, yVal, productId, title) {
		var obj = MM_findObj('swatchInfo');
		var objSwatch = MM_findObj('swatches');
		if(obj && objSwatch) {
			var offset = getOffset(objSwatch);
			obj.style.left = (offset.l + xVal) + 'px';
			obj.style.top = (offset.t + yVal) + 'px';
			obj.innerHTML = productId + '<br />';
			if(title.toLowerCase() != 'null')
				obj.innerHTML += title;
			if(obj.style.visibility != 'visible')
				obj.style.visibility = 'visible';
		}
	}
	
	function hideSwatchInfo() {
		var obj = MM_findObj('swatchInfo');
		if(obj)
			obj.style.visibility = 'hidden';
	}

	function setBreadCrumbs() {
		if(typeof(SWFObject) === 'undefined')
			return;

		var args = setBreadCrumbs.arguments;
		var properties;
		var swfPath = "/swf/breadcrumbs.swf";
		var breadcrumbImage = 'arrow';
		var so;
		var obj, objTD;
		var i = 0;
		
		if(navigator.userAgent.indexOf('Safari') != -1 && args[i] !== false) {
			var str = '';
			for(i=0; i < args.length; i++) {
				str += ', ' + "'" + args[i].replace(/'/g, "\\'") + "'";
			}
			eval('setBreadCrumbs(false' + str + ');');
		}			
		else if(args[i] == false) {
			i = 1;
			obj = MM_findObj('breadcrumb_div');
			objTD = MM_findObj('breadcrumb_td');
			if(obj) {
				objTD.className = args[1];
				if(objTD.className.indexOf('breadcrumbs_holiday') == 0)
					breadcrumbImage = 'snowflake';
				obj.innerHTML = '';
				
				while(i < args.length-1) {
					if(args[i+2])
						properties = 'href="' + args[i+2] + '"';
					else
						properties = 'href="javascript:;" style="cursor:default;"';
					
					if(i > 1)
						obj.innerHTML += '<img src="/images/breadcrumbs/' + breadcrumbImage + '.gif" width="13" height="10" align="absmiddle" />';
						
					args[i+1] = args[i+1].replace(/<lcase>/g, '<span style="text-transform:none">');
					args[i+1] = args[i+1].replace(/<\/lcase>/g, '</span>');
						
					obj.innerHTML += '<a ' + properties + '">' + args[i+1] + '</a>';
					
					i += 2;
				}
			}
		}
		else {
//				var cacheKiller = "?ck=" + Math.random().toString().substr(5);
			// url of file, element id, width, height, version, bgcolor 
			
			while(i < args.length) {
				if(i == 0) {
					style = args[i];
					if(style.indexOf('breadcrumbs_holiday') == 0)
						swfPath = '/swf/breadcrumbs_holiday.swf';
					so = new SWFObject(swfPath, "breadcrumb_swf", "100%", "35", "8", "#FFFFFF"); 
					so.addParam("quality", "high"); 
					so.addParam("wmode", "transparent");
					so.addVariable("breadCrumb_total", Math.ceil((args.length - 1)/2));
		
					i++;
				}
				else {
					if(args[i])
						so.addVariable("breadCrumb_text_" + Math.ceil((i-1)/2), args[i].replace(/&amp;/g, '%26'));
					if(args[i+1])
						so.addVariable("breadCrumb_link_" + Math.ceil((i-1)/2), args[i+1]);
							
					i += 2;
				}
			}
			so.write("breadcrumb_div"); 
			if(MM_findObj('breadcrumb_swf') === null) {
				var str = '';
				for(i=0; i < args.length; i++) {
					str += ', ' + "'" + args[i].replace(/'/g, "\\'") + "'";
				}
				eval('setBreadCrumbs(false' + str + ');');
			}
			MM_findObj('breadcrumb_td').className = style;
		}
		
	}

	
	/*
	 * getCookie function to allow us to retrieve ASP cookie via javascript
	 */
	function getCookie(sName) {
		var sValue = "";
		var index = 0;
	
		//  search through the cookie string to find the name=value pair that we are looking for
		if (document.cookie)
			index = document.cookie.indexOf( sName + "=" );
		else
			index = -1;
	
		if (index < 0)
			sValue = "";
		else
		{
			var countbegin = (document.cookie.indexOf( "=", index ) + 1);
			if (0 < countbegin)
			{
				var countend = document.cookie.indexOf( ";", countbegin );
				if (countend < 0)
					countend = document.cookie.length;
				sValue = document.cookie.substring( countbegin, countend );
			}
			else
				sValue = "";
		}
		return sValue;
	}
	
	/*
	 * getCookie function to allow us to retrieve ASP cookie via javascript
	 */
	function requestXML(url, readyStateChange) {
		http_request = false;
		if (window.XMLHttpRequest) { // Mozilla, Safari,...
			http_request = new XMLHttpRequest();
			if (http_request.overrideMimeType) {
				http_request.overrideMimeType('text/xml');
			}
		}
		else if (window.ActiveXObject) { // IE
			try {
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e) {
				try {
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {}
			}
		}
		if (!http_request) {
			return false;
		}

		http_request.onreadystatechange = readyStateChange;
		http_request.open('GET', url, true);
		http_request.send(null);
	}


	function showToolTip(e, text) {
		if(!e) var e = window.event;

		var div = MM_findObj('toolTipLayer');
		if(div)
			div.innerHTML = text;
		else
			return;
			
		var bodyTag;
		var scrollX = (window.pageXOffset)? window.pageXOffset : (document.documentElement)? document.documentElement.scrollLeft : (document.body)? document.body.scrollLeft : 0;
		var scrollY = (window.pageYOffset)? window.pageYOffset : (document.documentElement)? document.documentElement.scrollTop : (document.body)? document.body.scrollTop : 0;
		
		var posX = (e['pageX'])? e['pageX'] : e['clientX'] + scrollX;
		var posY = (e['pageY'])? e['pageY'] : e['clientY'] + scrollY;
		

		var maxX;
		var maxY;
		if(window.innerWidth) {
			maxX = window.innerWidth;
			maxY = window.innerHeight;
		}
		else if(document.documentElement && document.documentElement.clientWidth) {
			maxX = document.documentElement.clientWidth;
			maxY = document.documentElement.clientHeight;
		}
		else {
			maxX = document.body.clientWidth;
			maxY = document.body.clientHeight;
		}
			

		if(posX+15+div.offsetWidth-scrollX > maxX)
			posX -= (div.offsetWidth + 30);
		if(posX < 0)
			posX = 0;

		if(posY+20+div.offsetHeight-scrollY > maxY)
			posY -= (div.offsetHeight + 40);
		if(posY < 0)
			posY = 0;
			
		div.style.left = (posX+15) + 'px';
		div.style.top = (posY+20) + 'px';
		
		if(div.style.visibility != 'visible')
			div.style.visibility = 'visible';
			
		hideDivSelects(1, div);
	}
	
	function hideToolTip() {
		var div = MM_findObj('toolTipLayer');
		if(div)
			div.style.visibility = 'hidden';

		showDivSelects(1);
	}
	
	
//----------------------------------------------------
// Update IC Swf Header height if the text is too long
//----------------------------------------------------
	
	function updateHeader_height(swfID, height) {
		var objSwf = MM_findObj(swfID);
		var objDiv;
		
		if(objSwf) {
			objDiv = objSwf.parentNode;

			if(objDiv) {
				height += 28;
				objDiv.style.height = height + 'px';
				objSwf.style.height = height + 'px';
			}
		}

	}
	
//----------------------------------------------------
// Send IC Swf Header the Width of it's parent Obj
//----------------------------------------------------
	function sendHeader_width(swfID) {
		var objSwf = MM_findObj(swfID);
		var objDiv;
		var width;
		
		if(objSwf) {
			objDiv = objSwf.parentNode;

			if(objDiv) {
				width = objDiv.offsetWidth;
			}
		}
		objSwf.setWidth(width);

	}
	
//----------------------------------------------------
// Get IC Swf Header width
//----------------------------------------------------
	function getHeader_width(swfID) {
		var objSwf = MM_findObj(swfID);
		var objDiv;
		var width;
		
		if(objSwf) {
			objDiv = objSwf.parentNode;

			if(objDiv) {
				width = objDiv.offsetWidth;
			}
		}
		if(width == 0 || isNaN(width)) {
			addOnLoad(sendHeader_width, swfID);
		}
					   
		return width;

	}

//-->

