var c=new Array();
c[0] = true;
c[1] = false;
c[2] = false;
c[3] = false;
c[4] = false
c[5] = false
c[6] = false
c[7] = false
c[8] = false
c[9] = false
c[10] = false

c['newsletter'] = false
c['cookie'] = false

function changeCHB(el) {
	if(!c[el]) {
		if (c[0] && document.getElementById('gchb0')) {
			document.getElementById('gchb0').style.backgroundImage="url("+tpldir+"images/c-off.gif)";
			c[0] = false;
		}
		if (!c[0] && el == 0 && document.getElementById('gchb0')) {
			for (i=1;i<9;i++) {
				document.getElementById('gchb'+i).style.backgroundImage="url("+tpldir+"images/c-off.gif)";
				c[i] = false;
			}
		}
		document.getElementById('gchb'+el).style.backgroundImage="url("+tpldir+"images/c-on.gif)";
		c[el] = true;
	} else {
		document.getElementById('gchb'+el).style.backgroundImage="url("+tpldir+"images/c-off.gif)";
		c[el] = false;
	}
}
function storeCHB(el)
{
	document.getElementById("types").value = YAHOO.lang.JSON.stringify(c);
}
function changeCHBel(el) {
	var chb = document.getElementById(el);
	if (chb.checked) {
		chb.checked = false;
	} else {
		chb.checked = true;
	}
}
function showFlash(c){
	if(c.checked) {
		document.getElementById('flash').style.display = 'block';
	} else {
		document.getElementById('flash').style.display = 'none';
	}
}
function showMap() {
	var el = document.getElementById('map');
	if (el.style.display == 'block') {
		el.style.display = 'none';
	} else {
		el.style.display = 'block';
		location.href = '#map';
		loadMap();
	}
}
function printMap(){
	document.getElementById('p').style.display = 'none';
	document.getElementById('t').style.display = 'none';
	document.getElementById('map-print').style.display = 'block';
	loadMapBig()
	//window.print();
	}
function goRestaurant(url) {
	location.href = url;
	}
function submitForm(el) {
	document.getElementById(el).submit();
	}
function showOverlib(e) {
	if (e == 1) {
		overlib('Die Sterne zeigen die Preis/Wert Meinung der Kunden. Je mehr Sterne bei einem Zusteller stehen, desto zufriedener sind die Kunden.');
	} else {
		overlib('Das Lokal gibt einen Lieferzeitraum an wie lange eine Lieferung dauern könnte. Die Zahl in den Klammern gibt die tatsächliche durchschnittliche Lieferzeit an in der unsere Kunden ihre Bestellung erhalten haben.')
	}
}

function bOvu(el, m) {
	if (m == 1) {
		el.style.color='#F0981C';
	}
	if (m == 0) {
		el.style.color='#626262';
	}
	if (m == 4) {
		el.style.color='#000000';
	}
	if (m == 2) {
		el.style.color='#970103';
	}
	if (m == 3) {
		el.style.color='#F0981C';
	}
}


function setSubdataSelect(o1,o2,o3,o4,o5) {
	document.forms['modform'].age.selectedIndex = o1
	document.forms['modform'].gender.selectedIndex = o2
	document.forms['modform'].qualification.selectedIndex = o3
	document.forms['modform'].occupation.selectedIndex = o4
	document.forms['modform'].netspeed.selectedIndex = o5
}
function showPhone() {
	var so = new SWFObject("/template/_content/phone.swf", "phone", "35", "25", "6", "#ccccff");
	so.addParam("wmode", "transparent");
	so.write("phone");
}

function whatwhere(what, where) {
	var d = document.getElementById('dir').value
	document.getElementById('what').style.display = what;
	document.getElementById('where').style.display = where;
	if (what == 'block') {
		p = 'mainpage';
	} else {
		p = 'map';
	}
	writeHelp('/'+d, 'http://www.netkellner.at/'+d+'/guide/'+p+'/config.xml')
}
	
	
function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}
	

function switchAddrLogin(what, where) {
	document.getElementById('oldadd').style.display = what;
	document.getElementById('newadd').style.display = where;
	}

function highlightRow(el, o) {
	if (o == 1) {
		el.style.backgroundColor='#fff';
	} else {
		el.style.backgroundColor='transparent';
	}
}
function writeHelp(e,t) {
	var so = new SWFObject(e+'/guide/main.swf?f='+t, "guide", "1000", "1000", "9", "#ffffff");
	so.addParam("wmode", "transparent");
	so.write("help");
}
function showHelp() {
	var el = document.getElementById('help')
	if (el.style.display == 'none') {
		document.getElementById('help').style.display='block';
	} else {
		document.getElementById('help').style.display='none';
	}
}
function writeMap(foodType, ssid) {
	var so = new SWFObject("/template/_content/map_engine2008.swf?path=/template/_content/map_engine_config_at_2008_net.xml?date=20100224&ssid="+ssid+"&t="+foodType+"&loadtext=Loading...&ver=1", "map_engine_at", "700", "450", "7", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("country");
	document.getElementById('foodtype').value = foodType;
}
function popIt(page,name,width,height) {
	window.open(page,name,'width='+width+',height='+height+'');
}

function showOverlibIndexEng(ssid) {
		ol_fixx=233;
		ol_fixy=510;
		ol_sticky = 1;
		ol_width = 112;
		overlib('<div onclick="writeMapEng(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">groceries</div><div onclick="writeMapEng(10, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">sandwich</div><div onclick="writeMap(99, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">Drinks</div>');
}

function showOverlibIndex(ssid) {
		ol_fixx=603;
		ol_fixy=500;
		ol_sticky = 1;
		ol_width = 112;
		overlib('<div onclick="writeMap(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">Lebensmittel</div><div onclick="writeMap(10, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">Sandwich</div><div onclick="writeMap(99, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">Getränke</div>');
}
function indexFood(s, el) {
	if (s == 1) {
		el.style.backgroundColor='#f5f3ee';
	} else {
		el.style.backgroundColor='#ffffff';
	}
}
function ndIndex(ssid) {
	var el = document.getElementById('overDiv')
	//alert(el)
		
	if (el == null) {
		showOverlibIndex(ssid)
	} else {
		if(el.style.visibility=='hidden') {
			showOverlibIndex(ssid)
		} else {
			el.style.visibility='hidden';
		}
	}
}