var ns4=document.layers    //popup albalk kezdet
var ie4=document.all
var ns6=document.getElementById&&!document.all

//drag drop funkció NS 4 -hez////
var dragswitch=0
var nsx
var nsy
var nstemp

function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
//drag drop funkció ie4+ and NS6 -hoz////
function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx
crossobj.style.top=tempy+e.clientY-offsety
return false
}
} //popup albalk eddig

function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage

var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "HTML" : "BODY"

while (firedobj.tagName!=topelement&&firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")

////drag drop funkció vége itt//////
function hidebox(){
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}

function maketable(n) {
  var nb;
  this.length = n;
  for (var i = 1; i <=n; i++)
    if (i<10) {
      nb = i+"";
      nb = nb.substring(0,1);   	
      this[i] = nb;
    }
  return this;
}

function conversion(color) {
  var hexa1;
  var hexa2;
  var colorHexa;
  tabHex = new maketable(16);

  tabHex[10]="A"; tabHex[11]="B"; tabHex[12]="C"; tabHex[13]="D"; tabHex[14]="E"; tabHex[15]="F";
  hexa2 = (color%16);
  hexa1 = parseInt(color/16);
  hexa2 = tabHex[hexa2];
  if (hexa2 == null)
    hexa2 = "0";
  hexa1 = tabHex[hexa1];
  if (hexa1 == null)
    hexa1 = "0";
  colorHexa = hexa1 + hexa2;
  return colorHexa;
}

function degrade(atext, asize, afont, RGB) {
  var factor = 256/(atext.length+1);
  var i;
  var c1,c2,c3;

  for (i=0;i<atext.length;i++)   {
    ton=factor*i;
    if (RGB == 0) {
      c1 = 'FF'  //htsz
      c2 = conversion(ton);
      c3 = c2;
    }
    else if (RGB == 1) {
      c1 = conversion(ton);
      c2 = 'FF'
      c3 = c1;
    }
    else {
      c1 = conversion(ton);
      c2 = c1;
      c3 = 'FF'
    }
   document.write ('<FONT SIZE=' + asize + ' FACE="' + afont + '" COLOR="#' + c1 + c2 + c3 + '">' + atext.substring (i,i+1) + '</FONT>');
  } 
}

//nap lekerdezese
function makeArray0() {  
   for (i = 0; i<makeArray0.arguments.length; i++) this[i] = makeArray0.arguments[i];  
   this.length=makeArray0.arguments.length; 
   } 
  
var days = new makeArray0("vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat");  
var adatum = new Date(document.lastModified);
var nap = days[adatum.getDay()]
//nap lekerdezese vege
