function resize_iframe()
{

	var height=window.innerWidth;//Firefox
	if (document.body.clientHeight)
	{
		height=document.body.clientHeight;//IE
	}
	//resize the iframe according to the size of the
	//window (all these should be on the same line)
	document.getElementById("glu").style.height=parseInt(height-
	document.getElementById("glu").offsetTop-100)+"px";
}

// this will resize the iframe every
// time you change the size of the window.
//window.onresize=resize_iframe; 

//-->
  
function pop(file) {

    var width = 500;
    var height = 343;
    var top=(screen.height-height)/2;
    var left=(screen.width-width)/2;
    var options = "menubar=no,scrollbars=no,statusbar=no";
    
    preview = window.open(file,"test","top="+top+",left="+left+",width="+width+",height="+height+","+options);
    preview.focus();
    return false;
}

function smilie(smilietext) {
  document.eintrag.eintrag.value += smilietext+" "; 
  eintrag.eintrag.focus();
}

var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

var mask2load = new Array();
mask2load[0] = "<?=$thisdir?>/masks/8bit/crippleedge.png";
mask2load[1] = "<?=$thisdir?>/masks/8bit/frizzedge.png";
mask2load[2] = "<?=$thisdir?>/masks/8bit/softedge.png";
// if you want IE to use mask images: add GIF versions
// of the same name to the array (edge.js will find them)
mask2load[3] = "<?=$thisdir?>/masks/2bit/crippleedge.gif";
mask2load[4] = "<?=$thisdir?>/masks/2bit/frizzedge.gif";
mask2load[5] = "<?=$thisdir?>/masks/2bit/softedge.gif";