// EGYEB javascriptek	
	

function ahah(url, t, w, h, title, id, x, y ) {	
//alert(url + ' *** t: ' + t + '   ***W: ' + w + ' *** H: ' + h);
//var linktype=url.charAt(0);

if (w==undefined) {w=450;}
if (h==undefined) {h=300;}
if (x==undefined) {x=100;}
if (y==undefined) {y=100;}

var x= 1*x + 80; 
var y= 1*y+ 40; 

var pw= 1*pageWidth();
var ph= 1*pageHeight();

w=1*w;
h=1*h;
if ((x+w)>=pw-20) {
	 x=pw-w-40;
	}
if ((y+h)>=ph-20) {
	y= ph-h-40;
	}

x= Math.max(5,x);
y= Math.max(5,y);

if (t == 'w') { //http link, open browser window
	window.open(url,"_blank");	
	
}  else if (t == 'n') {

//

} else { 

openmypage(url, t, w, h, title, id, x, y );
  }
  


}  

//open:function(t, contenttype, contentsource, title, attr, recalonload)

function openmypage(url, t, w, h, title, id, x, y ){ //Define arbitrary function to run desired DHTML Window widget codes


if (t=='b') {
//	var neve="bbox" + id;
	var neve="box" ;
ajaxwin=dhtmlwindow.open(neve, "ajax", url, title, "width=" + w + "px,height=" + h +"px,left=" + x + "px,top=" + y +"px,resize=1,scrolling=1");
//ajaxwin.onclose=function(){return window.confirm("Close window 3?")} //Run custom code when window is about to be closed
} else if (t=='u') {
	//var neve="bbox" + id;
	var neve="box";
	
	iframewin=dhtmlwindow.open(neve, "iframe", url, title, "width=" + w + "px,height=" + h +"px,left=" + x + "px,top=" + y +"px,resize=0,scrolling=0,center=0","recal");
} else {
	var neve="box";
ajaxwin=dhtmlwindow.open(neve, "ajax", url, title, "width=" + w + "px,height=" + h +"px,left=" + x + "px,top=" + y +"px,resize=0,scrolling=0")	
	}
}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?  document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;} 
function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;} 
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;} 
function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;} 
function posRight() {return posLeft()+pageWidth();} 
function posBottom() {return posTop()+pageHeight();}
                    
