// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//----------------------- Submenu maker script v.1.0 by Shua --------------------------------------------------

function layerVisibility(id, vis) {
	document.getElementById(id).style.visibility=vis
}

function menuIndicator(id, status) {
	activeColor = '#C0C0C8' //Erre a színre cserél!!!
	inactiveColor = '#EFEFF1'; //Erre a színre áll vissza!
	preferedColor = 'Black' 
	if (status == 'active') {document.getElementById(id).style.background=activeColor}
	if (status == 'inactive') {document.getElementById(id).style.background=inactiveColor}
	if (status == 'prefered') {document.getElementById(id).style.background=preferedColor}
}
//-------------------------------------------------------------------------------------------------------------
//A képek egyszerű ablakának scriptje!	
function referPics(picsSrc, width, height) {
	referWindow = open ("", "", "width="+width+",height="+height+",toolbar=no,menubar=no,directories=no,location=no,resizable=no,status=no,scrollbars=no")
	referWindow.document.write("<body topmargin='0' leftmargin='0'><a href='javascript:close()'>")
	referWindow.document.write("<img src='"+picsSrc+"' border='0'>")
	referWindow.document.write("</a></body>")
}

function langSwitch() {
	v_location = location
	v_location = v_location.toString()
	if (v_location.search('file') != -1) v_location = v_location.replace('file:///F:/Concordia%20Site/uploads/', '')
	if (v_location.search('http') != -1) v_location = v_location.replace('http://www.concordia-zipper.hu/', '')
	
	var v_dirarr = v_location.split('/')
	v_dirpos = v_dirarr.length
	v_dir = ''
	for (i=1; i < v_dirpos; i++) {
		v_dir = v_dir + '../'
	}
	
	if (v_location.search('eng_html') != -1) {
		v_location = v_location.replace('eng_html/', '')
		v_location = v_dir + v_location
	} else v_location = v_dir + 'eng_html/' + v_location
	
	window.location.href = v_location
}