// JavaScript Document
function normal(image_name, image_src) {
    eval(document[image_name]).src = 'imgs/site_elements/buttons/' + image_src + '.gif'; 
}

function over(image_name, image_src) {
    eval(document[image_name]).src = 'imgs/site_elements/buttons/' + image_src + '_ov.gif'; 
}

function winopen_listen(theURL) {
    win = window.open(theURL,'bestellen','height=450,width=351,top=30,left=30,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,dependend=yes,');
    win.focus();
}

// shoploactor
function checkSubmit(){
	if(document.forms.suche.shop.value == 1 && document.forms.suche.product.value == "Suchbegriff" || document.forms.suche.shop.value == 1 && document.forms.suche.product.value == "" || document.forms.suche.shop.value == 1 && document.forms.suche.product.value == "Suchbegriff eingeben" || document.forms.suche.shop.value == 1 && document.forms.suche.product.value == "Suchbegriff u. Shop wählen"){
		document.forms.suche.product.setAttribute('value', 'Suchbegriff u. Shop wählen');
	}
	else if(document.forms.suche.shop.value == 1){
		document.forms.suche.product.setAttribute('value', 'Wähle einen Shop');
	}
	else if(document.forms.suche.product.value == "Suchbegriff" || document.forms.suche.product.value == "" || document.forms.suche.product.value == "Suchbegriff eingeben" || document.forms.suche.product.value == "Suchbegriff u. Shop wählen" || document.forms.suche.product.value == "Wähle einen Shop"){
		document.forms.suche.product.setAttribute('value', 'Suchbegriff eingeben');
	}
	else{
		document.forms.suche.submit();
	}
}	
function checkEnter(evt) { 
	if (evt.keyCode==13){ 
		return(false);
	} 
} 

function openWin(url, h, w){ 
var Fenster = 0;
   
var width=h; 
var height=w;

mywin = window.open(url, 'shopLocator', "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, width="+width+", height="+height+", left="+(screen.availWidth - width) / 2+",top="+(screen.availHeight - height) / 2+",fullscreen=no");

	if (Fenster > 2)
		mywin.top;
		mywin.focus();
}

function changeURL(u){
if(u != "noaction")top.location.href=u;
else{document.forms[0].reset();document.forms[0].elements[0].blur();return}
}

