
function redirect(){
  if(document.referrer.indexOf("http://www.cs-and-cs.hu")
  != -1){
  }else{
    window.location="http://www.cs-and-cs.hu/index.html";
  }
}

function edithez(id){
  var val = document.getElementById(id).value;
  window.location="http://www.einstand.hu/cgi-bin/kodein_sd.pl?tempx=index&xml=index&kod="+val;
}

function size_parentdiv_to_img(id_img) {

    var imgparent = document.getElementById(id_img).parentNode;
    var imgparentparent = document.getElementById(id_img).parentNode.parentNode;

    var imgparentheight = imgparent.offsetHeight;
    var imgparentparentheight = imgparentparent.offsetHeight;

    var imgheight = document.getElementById(id_img).height;

    if(document.all){
	imgparentparentheight -= imgheight;
    }else{
	var paddingtop = document.defaultView.getComputedStyle(imgparentparent,'').getPropertyValue('padding-top').replace('px','');    
	imgparentparentheight -= paddingtop;
    }

    var maxheight = imgheight;
//alert("parentheight="+imgparentheight);    
//alert("parentparentheight="+imgparentparentheight);    
//alert("imgheight="+imgheight);    
    if(imgparentheight > imgheight){
	maxheight = imgparentheight;
//alert("parent nagyobb");	
    }
    if(imgparentparentheight > maxheight){
	maxheight = imgparentparentheight;
//alert("parentparent nagyobb");	
    }
    

    imgparent.style.height = maxheight+"px";
    imgparentparent.style.height = maxheight+"px";
}


