// JavaScript Document
function yaImgChange(imgNum,imgSrc) {
	document.images[imgNum].src = imgSrc;
}
function showDiv(id){
	if (document.getElementById(id).style.display=='block'){
		document.getElementById(id).style.display='none';
	} else {
		document.getElementById(id).style.display='block';
	}
}

function openDemo(){
		newWindow=window.open('/adc-demo/adc2.html','','width=760,height=420,location=yes,status=no,toolbars=yes,resizable=yes,scrollbars=no');
}
function confirmDelete(section){
	if (confirm('Are you sure you want to delete this '+section+'?')){
			return true;
		} else {
			return false;
		}
}
function searchAccessory(){
	if(document.getElementById("accessorySearchTerm").value=="" || document.getElementById("accessorySearchTerm").value=="Keyword or Model #"){
		alert("You must enter a search term.");
	} else {
		window.location="/accessory_search.aspx?term="+document.getElementById("accessorySearchTerm").value;
	}	
}
function searchMain(){
	if(document.getElementById("accessorySearchTermMain").value==""){
		alert("You must enter a search term.");
	} else {
		window.location="/search.aspx?term="+document.getElementById("accessorySearchTermMain").value;
	}	
}
function overNavDiv (id){
	document.getElementById("main"+id).style.borderColor='5199B6';
	document.getElementById("main"+id).style.backgroundColor='77B1C9';
}
	
function outNavDiv (id){
	document.getElementById("main"+id).style.borderColor='3AAB39';
	document.getElementById("main"+id).style.backgroundColor='3AAB39';
}

function outTersh (id){
	document.getElementById("tersh"+id).src='/basic/nav_dot.gif';
}
function overTersh (id){
	document.getElementById("tersh"+id).src='/basic/nav_dot_on.gif';
} 


function doKey(e) {
	whichkey = (document.layers) ? e.which : event.keyCode;
	if (whichkey==13) {
		return false
	}
} 
 
