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('A csillagok a fogyasztók ár/érték vélményét mutatják az étteremről. Minél több csillag van egy szállítónál, annál jobban meg vannak elégedve a vendégek.');
	} else if (e == 0){
		overlib('A kiszállítási időt a szállító adja meg, de zárójelben, plusz információként feltüntetjük az előző három hónap fogyasztói szavazatainak átlagát is!')
	} else if (e == 2){

	}
}

function showOverlibIndex(ssid) {
		ol_fixx=613;
		ol_fixy=770;
		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?date=20100604&ssid="+ssid+"&t="+foodType+"&loadtext=Loading...&ver=6", "map_engine_hu", "700", "450", "7", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("magyarorszag");
}
function writeMapEng(foodType, ssid) {
	var so = new SWFObject("/template/_content/map_engine2008.swf?path=/template/_content/map_engine_config_eng_2008.xml?date=20100604&ssid="+ssid+"&t="+foodType+"&loadtext=Loading...&ver=6", "map_engine_hu", "700", "450", "7", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.write("magyarorszag");
}
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+'');
}

function showFood(el, tag) {
	var c = document.getElementById('slider_'+el);
	if (c.style.display=='none') {
		if (c.innerHTML=='') {
		c.innerHTML='<object width="600" height="90" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><param value="http://static.indafoto.hu/swf/photo_stream.swf" name="movie"/><param value="best" name="quality"/><param value="#f7ebde" name="bgcolor"/><param value="always" name="allowScriptAccess"/><param value="atomURL=http://feed.indafoto.hu/tag/%3Anetpincer.'+tag+'/feed&amp;bgColor=f7ebde&amp;random=true&amp;number=8&amp;titleColor=000000&amp;imageSize=xs&amp;orientation=horizontal&amp;target=blank&amp;streamAlign=front" name="FlashVars"/><embed width="600" height="90" align="middle" type="application/x-shockwave-flash" flashvars="atomURL=http://feed.indafoto.hu/tag/%3Anetpincer.'+tag+'/feed&amp;bgColor=f7ebde&amp;titleColor=000000&amp;number=8&amp;random=true&amp;imageSize=xs&amp;orientation=horizontal&amp;target=blank&amp;streamAlign=front" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always" bgcolor="#f7ebde" quality="best" src="http://static.indafoto.hu/swf/photo_stream.swf"/></object>';
		}
		c.style.display='block';
	} else {
		c.style.display='none';
	}
}