
// storfinder
function showMap() {
	window.open('storefinder_map.html','storefinder','width=730, height=620, scrollbars=yes')
}

//auswahlliste 
function showHideDropDown (id) {
	var box = document.getElementById(id);
	box.style.display = box.style.display == "block" ? "none" : "block";
}


// register, precard detail
function showPreDetail(name) {
	var pics = new Array('card','detailNr','detailPin');
	for (var i = 0; i < pics.length; i++) {
		document.getElementById(pics[i]).style.display='none';
	}
	document.getElementById(name).style.display='block';
}

function linkto(target, link_type)
{
	if (link_type == 'external') {
		window.open(target);
	}
	else {
		document.location.href = target;	
	}
}

function changeCountyimg(countrycode) {
		document.getElementById('country_selection_effects').style.backgroundImage="url(/_bib_edc/img/default/bg_ul_countryselect_"  + countrycode +  ".gif)";
} 
/**
* Pops up a new window in the middle of the screen
*/
function popupWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function entsub(myevent, myform)
{
	if (myevent && myevent.which) {
		characterCode = myevent.which;
	}
	else {
	characterCode = myevent.keyCode
	}

	if (characterCode == 13) {
		myform.submit();
		return false;
	}
	else {
		return true;
	}
}

function boxConfirm(boxtext)
{
	if (window.confirm(boxtext)) {
		return true;
	}
	
	return false;
}
