				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 getAddress(){
					href = new String(document.location.href);
					startUrlPosition = href.indexOf("://");
					endUrlPosition = href.lastIndexOf("/", href.length - 1);
					address = href.substring(startUrlPosition + 3, endUrlPosition);
					return(address);
				}
			
			
				function LogIn(){
					href = new String(document.location.href);
					startUrlPosition = href.indexOf("://");
					endUrlPosition = href.lastIndexOf("/", href.length - 1);
					address = href.substring(startUrlPosition + 3, endUrlPosition);					
					address = address.replace(/\/newyork/i, "");
					address = address.replace(/\/chicago/i, "");
					address = address.replace(/\/dallas/i, "");
					address = address.replace(/\/losangeles/i, "");
					address = address.replace(/\/philadelphia/i, "");
					var frmLogIn = document.getElementById('frmLogIn');
					frmLogIn.action = "https://" + address + "/login.htm?redirect=0";
					frmLogIn.submit();
				}
				
				function createCookie(name,value,days)
				{
					if (days)
					{
						var date = new Date();
						date.setTime(date.getTime()+(days*24*60*60*1000));
						var expires = "; expires="+date.toGMTString();
					}
					else var expires = "";
					document.cookie = name+"="+value+expires+"; path=/";
				}

				function readCookie(name)
				{
					var nameEQ = name + "=";
					var ca = document.cookie.split(';');
					for(var i=0;i<ca.length;i++)
					{
						var c = ca[i];
						while (c.charAt(0)==' ') c = c.substring(1,c.length);
						if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
					}
					return 'nothing';
				}

				function eraseCookie(name)
				{
					createCookie(name,"",-1);
				}

				function checkStroke()
				{
					// if the user hits <ENTER> submit the form
					if(13 == window.event.keyCode)
					{
						LogIn();
					}
				}
				function ValidateCountry()
				{
					// if the does not select a country, don't submit form.
					if(document.frmTBQuickSearch.country.selectedIndex == 0)
					{
						alert('Please select a country');
					}
					else frmTBQuickSearch.submit();
				}
				/* country validation script per form name via parm */
				function ValidateCountryFormSubmit(formsubmit)
				{
					var fs = MM_findObj(formsubmit);
					//if the does not select a country, don't submit form.
					if(fs.country.selectedIndex == 0)
					{
						alert('Please select a country');
					}
					else fs.submit();
				}
				
				function readAnotherHash(){			
					// Get  hash cookies
					cookie = readCookie('anotherhash');	
					var go;
					if(cookie != 'nothing'){
						go = getValue(new String(cookie));
					}
					else{
						go = false;
					}
					
					// Read true cookie
					trueCookie = readCookie('true');
					if(trueCookie != 'nothing'){
						return false;
					}
			
					address = new String(document.location.href);
					var allowlogin;
					if(address.indexOf("out") > 0){
						allowlogin = false;
					}
					else{
						allowlogin = true;
					}
					
					if(go){
						address = getAddress();
						var frmLogIn = document.getElementById('frmLogIn');
						frmLogIn.action = "https://" + address + "/login.htm";
						frmLogIn.submit();
					}
				}
				
				function getValue(value){
					try{
						parts = value.split("&");
						myhash = new String(parts[0]);
						index = myhash.indexOf("=")
						var hashkey;
						
						// there is a value to extrat
						if(index > - 1 && (index + 1 < myhash.length)){
							
							hashKey = myhash.substring(index + 1, myhash.length - 1);
							return true;
						}
						else{
							return false;
						}
					}
					catch(ex){
						return false;
					}
				}
				
				function disposeOfFrames(){
					try{
						var allowExec = true;
						var frameLength = 0;						

						if(parent.document.frames.length > 0){																							
							source = new String(parent.document.frames.item(0).frameElement.src);													
							if(source.toLowerCase().indexOf("browsercheck") > -1) {	
								if (parent.document.frames["signupFrame"] != undefined) {
										allowExec = false;
								}		
							}	
								
						}
					
						if(parent.document.frames.length > 0 && allowExec){							
							if (parent.document.frames["signupFrame"] != undefined) {								
								parent.execScript("setIsPop();");							
								parent.document.location = document.location.href;	
							}
							
						}							
							
							
						
					}
					catch(ex){}
				}