// JavaScript Document
function fixPNG(myImage) // correctly handle PNG transparency in Win IE 5.5 or higher.
{
    if (window.ie55up)
	 {
	 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
	 strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
	 strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	 strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>" 
	 myImage.outerHTML = strNewHTML
	 //alert(strNewHTML);
	 }
}
var content = '';
var faktor = .8;
var size = 400;
function calc(b,h){
	if(b <= h){
	v = b/h;
	h=size;
	b=size*v;
	}else{
	v = h/b;
	b=size;
	h=size*v;
	}
	return b,h;
}
function pushContent(content,breite,hoehe) {
    div = document.getElementById('bild2');
	//calc(breite,hoehe);
	b= breite; h = hoehe;
	/**/if(b <= h){
	v = b/h;
	h=size;
	b=size*v;
	}else{
	v = h/b;
	b=size;
	h=size*v;
	}
	bild="<img src='"+content+"' width="+b+" height ="+h+" title='klicken um Bild zu schliessen'></img>";
    div.innerHTML = bild;
	//breite = breite*faktor;
	//hoehe = hoehe*faktor;
	
	
   
}

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; }
}

function fenster(pfad,b,h){
p=Math.round(Math.random()*1000); //alert(p);
neuFen = open(pfad,p,"width="+h+",height="+b+",left=10,top=10,resizable=0");
 with(neuFen){
    //document.write("hallo");
  document.write("<html><head><title>Cloud Green</title></head>");
  document.write("<body style='margin:0px' onBlur='window.self.close()'><img src="+pfad+"></img></body></html>");
 document.close();
 focus();
 }
}
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
