function ablak(file,scroll,width,height,name) {
    nagyablak =window.open('',name,'top=0,left=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scroll+',resizable=0,width='+width+',height='+height);
    nagyablak.document.open();
    nagyablak.document.write("<html><head><title>Popup</title><LINK rel=\"stylesheet\" href=\"themes/style_common.css\" type=\"text/css\"></head><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
    nagyablak.document.write("<div align=center><a href='javascript:window.close()'><img src='"+file+"' border='1' alt='"+name+"' class=\"pic\"></a></div>");
    nagyablak.document.write("</body></html>");
    nagyablak.document.close();
} 

function pic_window(url,scroll,width,height){
	if (url != '') {
		window.open(url,'','scrollbars='+scroll+',width='+width+',height='+height+',top=0,left=0');
	}
}

function user_window(url,scroll,width,height){
	if (url != '') {
		window.open(url,'','scrollbars='+scroll+',width='+width+',height='+height+',top=0,left=0');
	}
}

function images_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=730,height=640,top=0,left=0');
	}
}

function print_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=1,width=600,height=550,top=0,left=0');
	}
}

function video_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=360,height=370,top=0,left=0');
	}
}

function email_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=575,height=380,top=0,left=0');
	}
}

function check_email_form(eform){
    var hiba = "";
    
    if (eform.to_email.value == "") hiba = hiba + "Kérjük adja meg a címzett E-mail címét!\n";
    if (eform.from_name.value == "") hiba = hiba + "Kérjük adja meg az Ön nevét!\n";
    
    if (hiba != ""){
		alert(hiba);
		return false;
    }
        
    if (eform.to_name.value == "") hiba = hiba + "A címzett neve\n";
    if (eform.from_email.value == "") hiba = hiba + "Az Ön e-mail címe\n";
    if (eform.message.value == "") hiba = hiba + "Üzenet szövege\n";
    if (hiba != ""){
		if (confirm("A következő mezők nem lettek kitöltve:\n\n"+ hiba + "\nBiztos, hogy elküldi?")){
		    eform.submit();
		    return true;
		}else{
		    return false;
		}    
    }else{
		eform.submit();
		return true;
    }
}

var message="Nem elérhető funkció";   //edit this message to say what you want

function clickIE() {
	if (document.all) {alert(message); return false;}
	else return true;
}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {alert(message);return false;}
		else return true;
	}else{
		return true;
	}
}
if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else{
	document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false")

function pano(name, pan, panMax, panMin, tilt, tiltMax, tiltMin, fov) {
	//380x200
	// var pW = 520;	var pH = 200;
	var pW = 168;	var pH = 300;
	var pX0 = pW - 90;	var pY0 = pH - 18;	var pA0 = pW - 76;	var pB0 = pH - 4;
	var pX1 = pW - 72;	var pY1 = pH - 18;	var pA1 = pW - 58;	var pB1 = pH - 4;
	var pX2 = pW - 54;	var pY2 = pH - 18;	var pA2 = pW - 40;	var pB2 = pH - 4;
	var pX3 = pW - 36;	var pY3 = pH - 18;	var pA3 = pW - 22;	var pB3 = pH - 4;
	var pX4 = pW - 18;	var pY4 = pH - 18;	var pA4 = pW - 4;	var pB4 = pH - 4;
	var panSpeed = 0.1;

	document.write(	'<div style="width:100%; height:300px; text-align: center;">' +
					'<applet name="pan_medence" archive="files/panorama/ptviewer.jar"  class="imgHSK" code="ptviewer.class" width="' + pW + '" height="' + pH + '">' +
					'<param name="file" value="files/panorama/panorama_shop.jpg">' +
					'<param name="auto" value="' + panSpeed + '">' +
					'<param name="pan" value="' + pan + '">' +
					'<param name="panmax" value="' + panMax + '">' +
					'<param name="panmin" value="' + panMin + '">' +
					'<param name="tilt" value="' + tilt + '">' +
					'<param name="tiltmax" value="' + tiltMax + '">' +
					'<param name="tiltmin" value="' + tiltMin + '">' +
					'<param name="fov" value="' + fov + '">' +
					'<param name="frame" value="files/panorama/nav.gif">' +
					'<param name="shotspot0" value="x' + pX0 + '  y' + pY0 + '  a' + pA0 + '  b' + pB0 + '  u\'ptviewer:startAutoPan(-' + panSpeed + ',0,1)\'">' +
					'<param name="shotspot1" value="x' + pX1 + '  y' + pY1 + '  a' + pA1 + '  b' + pB1 + '  u\'ptviewer:stopAutoPan()\'">' +
					'<param name="shotspot2" value="x' + pX2 + '  y' + pY2 + '  a' + pA2 + '  b' + pB2 + '  u\'ptviewer:startAutoPan(' + panSpeed + ',0,1)\'">' +
					'<param name="shotspot3" value="x' + pX3 + '  y' + pY3 + '  a' + pA3 + '  b' + pB3 + '  u\'ptviewer:ZoomIn()\'">' +
					'<param name="shotspot4" value="x' + pX4 + '  y' + pY4 + '  a' + pA4 + '  b' + pB4 + '  u\'ptviewer:ZoomOut()\'">' +
					'</applet>' +
					'</div>');
}

function flashpage_window(url){
	if (url != '') {
		window.open(url,'','resizable=1,scrollbars=1,width='+screen.width+',height='+screen.height+',top=0,left=0');
	}
}
