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('Stars ratings represent value for money');
	} else if (e == 0){
		overlib("This first figure shows the restaurant's advertised delivery time. The second figure shows the average delivery time according to our ratings!")
	} else if (e == 2){

	}
}

function showOverlibIndex(ssid) {
		ol_fixx=623;
		ol_fixy=510;
		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">élelmiszer</div><div onclick="writeMap(10, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">szendvics</div><div onclick="writeMap(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">aprósütemény</div><div onclick="writeMap(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">jégkocka</div>');
}
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="writeMapEng(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">cookies</div><div onclick="writeMapEng(3, \''+ssid+'\');whatwhere(\'none\',\'block\');ndIndex();" onmouseover="indexFood(1, this);" onmouseout="indexFood(0, this);" class="cp">ice cube</div>');
}
function indexFood(s, el) {
	if (s == 1) {
		el.style.backgroundColor='#F4EBDA';
	} 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';
		}
	}
}
function ndIndexEng(ssid) {
	var el = document.getElementById('overDiv')
	if (el == null) {
		showOverlibIndexEng(ssid)
	} else {
		if(el.style.visibility=='hidden') {
			showOverlibIndexEng(ssid)
		} else {
			el.style.visibility='hidden';
		}
	}
}
function bOvu(el, m) {
	if (m == 1) {
		el.style.color='#970103';
	}
	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('template/design2008_eng/', '/'+d+'/guide/'+p+'/config.xml')
}
/*
function writeMap(foodType, ssid) {
	var so = new SWFObject("/template/_content/map_engine2008.swf?path=/template/_content/map_engine_config_hu_2008.xml&ssid="+ssid+"&t="+foodType+"&loadtext=Loading...", "map_engine_hu", "700", "450", "7", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("country");
}
*/
function writeMapEng(foodType, ssid) {
	var so = new SWFObject("/template/_content/map_engine2008.swf?path=/template/_content/map_engine_config_fr_eng_2008_net.xml&ssid="+ssid+"&t="+foodType+"&loadtext=Loading...", "map_engine_hu", "700", "450", "7", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("country");
}
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='#FFFAF0';
	} 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 popIt(page,name,width,height) {
	window.open(page,name,'width='+width+',height='+height+'');
}

