	
/*************************************
pop-up windows
**************************************/

function popUp(){
	var cntctWin = window.open("contact.php","cntctWin","height=450,width=350,scrollbars=no,toolbar=no,location=no,status=yes,resizable=no,");
	cntctWin.focus();
}

function mapPop(){
	var mapWin = window.open("map.php","mapWin","height=350,width=550,scrollbars=0,toolbar=no,location=no,status=yes,resizable=yes,");
	mapWin.focus();
}

/*************************************
American General: 
**************************************/
function legalWarning(){
	var agree=confirm("Financing is through GE Money UNITED STATES, an its is only available in the state of Nevada. Final sale must be completed in store. ID verification required with approved financing. If you are running pop up blockers hold down the control key when hitting OK-A new windows will appear. Do you want to continue?");
				if (agree){
					var amegen = window.open("http://www.gemoney.com/en/personal/for_your_home/walkerfurniture.html","amegen","height=650,width=950,scrollbars=yes,toolbar=yes,location=yes,status=yes,resizable=yes,"); amegen.focus();}
				else{return false ;}
}

/*************************************
Dynamic Search field
**************************************/

function setBlur(){
	document.getElementById("topNav").style.backgroundImage = "url(_img/search.gif)";
	var tex = document.topNav.searchinput.value;
	var len = tex.length;
	
	if ((len==0) || (leng=null) || (tex=="Search Walker")){
			document.getElementById("searchsubmit").style.visibility = "hidden";
			document.getElementById("searchinput").style.backgroundColor = "#FFFFFF";

		}
	else {
	document.getElementById("topNav").style.backgroundImage = "url(_img/searchRollOver.gif)";
	document.getElementById("searchsubmit").style.visibility = "visible";
	document.getElementById("searchinput").style.backgroundColor = "#E7F4FE";
		}
	}
	
function setFocus(){
	document.getElementById("topNav").style.backgroundImage = "url(_img/searchRollOver.gif)";
	document.getElementById("searchsubmit").style.visibility = "visible";
	document.getElementById("searchinput").style.backgroundColor = "#E7F4FE";

	}

/*************************************
Contact Form: show hidden input field (other) in the 
**************************************/
	
function showOther(){
	if(document.getElementById("subject").value =="Other"){
		document.getElementById("Other").style.visibility = "visible";
	}else{
		document.getElementById("Other").style.visibility = "hidden";
	}
}

/*************************************
fix non-breaking hyphen in safari 
**************************************/
var obs = new Object; 
obs.onDataChanged = function(notifier, data){
	var rows = dsRes.getData();
	for (var g = 0; g < rows.length; g++){
		rows[g]["name"] = rows[g]["name"].replace(/-/gi, "&#8209;");
		rows[g]["number"] = rows[g]["number"].replace(/-/gi, "&#8209;");
		rows[g]["description"] = rows[g]["description"].replace(/-/gi, "&#8209;");
	} //Spry.Debug.trace("obs.onDataChanged called!"); //show debug window
}; 

/*************************************
Banner slide show
**************************************/
function ImageChange(){ 
	var RowCount = dsWebBuys.getRowCount();
	if(RowCount>1){
		var randomNum= Math.floor(Math.random()*RowCount)
		var image = dsWebBuys.getRowByID(randomNum).banner;
		var bxml = "&xml=" + dsWebBuys.getRowByID(randomNum).xml;
		var alink = "<a href=\"webbuys.php?row="; // results page
		var url = "&mslct=0";
		var imageSrc = "<img src=\"_images/webbuys/banners/";
		document.getElementById('MagicImage').innerHTML = alink+randomNum+url+bxml+ " \"" + "id=\"hotOffer\"" + " >" + "Hot Offer"+  "</a>" + alink+randomNum+url+bxml+ " \" >" + imageSrc+image + " \"></a> "
	}else{
	clearInterval(bannerint);
	}
}


