// Decide browser version
var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false
var ie5 = false;

// Microsoft Stupidity Check(tm).
if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	}
}

button_on = new Image();
button_on.src = "button_on.gif";

button_off = new Image();
button_off.src = "button_off.gif";

  
    // Swap images on based on a name array
	function imageOn(elem,name) {
	  elem.style.backgroundImage = "url("+button_on.src+")"
	  elem.style.cursor = 'pointer'
	}

	function handOn(elem) {
	  elem.style.cursor = 'pointer'
	}

	// Swap images off based on a name array
	function imageOff(elem,name) {
	  elem.style.backgroundImage = "url("+button_off.src+")"
	}

	function trOn(elem,szin) {
  	  elem.style.backgroundColor = szin
	  elem.style.cursor = 'pointer'
	}

	// Swap images off based on a name array
	function trOff(elem,szin) {
  	  elem.style.backgroundColor = szin
	}

function ablak(abl,nev,x,y) {   
      posx = (screen.width / 2) - (x / 2);
      posy = (screen.height / 2) - (y / 2);
	  msg=open(nev,abl,"toolbar=no,directories=no,menubar=no," +
                "resizable=yes,width="+x+",height="+y+",scrollbars=no,left="+posx+",top="+posy);
   }
function ablak_fix(abl,nev,x,y) {   
      posx = (screen.width / 2) - (x / 2);
      posy = (screen.height / 2) - (y / 2);
	  msg=open(nev,abl,"toolbar=no,directories=no,menubar=no," +
                "resizable=no,width="+x+",height="+y+",scrollbars=no,left="+posx+",top="+posy);
   }
function ablak_scroll(abl,nev,x,y) {   
      posx = (screen.width / 2) - (x / 2);
      posy = (screen.height / 2) - (y / 2);

	  msg=open(nev,abl,"toolbar=no,directories=no,menubar=no," +
                "resizable=yes,width="+x+",height="+y+",scrollbars=yes,left="+posx+",top="+posy);
   }

function ablak2(nev) {   
      msg=window.open(nev)
   }

function insertExternalFile(fname,W,H) {
  document.write(''
  +'<IFRAME name="iframe" src="'+fname+'" scrolling="auto" frameborder=0 border=0'
  +(W==null ? '' : ' width='+W)
  +(H==null ? '' : ' height='+H)
  +'></IFRAME>'
  )
}


function show_select(){
  ablak_scroll ('select','contact.php?sel=1',500,300);
}

function close_refresh_opener(){
	opener.document.location.reload(true);
	self.close();
}

function submit(){
	self.document.forms[0].submit();
}


function insertExternalFile(fname,W,H) {
 if (navigator.appName.indexOf("Microsoft")!=-1
  || navigator.appName=="Netscape" 
     && parseInt(navigator.appVersion)>4
 ) 
 {
  document.write(''
  +'<IFRAME src="'+fname+'" scrolling="auto" frameborder=0 border=0'
  +(W==null ? '' : ' width='+W)
  +(H==null ? '' : ' height='+H)
  +'></IFRAME>'
  )
 }

 if (navigator.appName=="Netscape" 
     && parseInt(navigator.appVersion)==4) {
  document.write(''
  +'<ILAYER>'
  +'<LAYER src="'+fname+'" '
  +(W==null ? '' : ' width='+W)
  +(H==null ? '' : ' height='+H)
  +'></LAYER></ILAYER>'
  )
 }
}
