

function getDatumFromMillis(millis)
{
if(millis == 0) return;
var punkt = millis.indexOf(".");
var erg = millis.substring(0,punkt);

var Zeit = new Date();
Zeit.setTime(erg);
var Jahr = Zeit.getFullYear();
var Monat = Zeit.getMonth() + 1;
var Tag = Zeit.getDate();
var h=Zeit.getHours();
if(h <10) h="0"+h;
var m=Zeit.getMinutes();
if(m <10) m="0"+m;
return   Tag + "." + Monat + "." + Jahr +" "+h+":"+m;
}

//gibt die seitensteuerung in den kategorien aus << < 1 2 3 4 5 6... > >>
function vonBis(vona, bisa, count, catId, htmlseite)
{
var viewCount= 17;

var a= "";
var b="";


var von =  count-9-(count % 9)+1;  
	
var bis =  count;



if(bisa == bis){

	document.writeln("&nbsp;&nbsp;&nbsp;   ");
	vonBisLink(von,bis,catId,"<b>neu</b>",htmlseite);
}
else
{
//alert("count="+count+"vona="+vona+"bisa="+bisa +"von="+von+"bis="+bis);
	vonBisLink(vona+9,(count-bisa<18)?count:(bisa+9),catId,"<<",htmlseite);
	vonBisLink(von,bis,catId,"neu",htmlseite);
}
bis=von-1;
//alert("count="+count+"von="+von+"bis="+bis);
for( var i = 1; bis >0;i++)
{

	von = bis -8;
	//document.writeln("<a href='index.html?von="+i+"&bis="+(i+viewCount-1)+"&catId="+catId+"'>"+view+"</a>");
	if(von==vona){a="<b>";b="</b>";}
	vonBisLink(von, bis,catId,a+i+b,htmlseite);
	if(von==vona){a="";b="";}
	bis = von-1;
}

if(vona >=9)
vonBisLink(vona-9,vona-1,catId,">>",htmlseite);

function vonBisLink(von,bis,catId,view,htmlseite)
{
document.writeln("<a style='color:#000000; text-decoration:none;'  href='"+htmlseite+"?von="+von+"&bis="+bis+"&catId="+catId+"'>"+view+"</a>");
	
}
}
function link(ref,iurl)
{
var x=1000,y=700;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}

ref += "&innerWidth="+x+"&innerHeight="+y
document.writeln("<a href='"+ref+"'><img border='0' src='"+iurl+"'/></a>");
}



function doApplet(baseUrl,imageid,hinten,dimx,dimy,widthimg,heightimg,extern){
var x=1000,y=700;
var randTop=80, randX=150;
if(extern=='J')randTop=0;
if(extern=='S')randTop=0,randX=0;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}


x-=randX;
y-=randTop
var width=dimx*widthimg;
var height=dimy*heightimg;
var merkenW =width;
var merkenH =height;


if(x < width)
{
	height = (x/width)*height ; 
	width = x;
	
}

if(y <  height)
{ 
	width=(y/height)*width ;
	height=y;
	
}
if(extern=='S')width=width-4;
var s="";
s+="<applet archive='../../../game/cyberpuzzle.jar' code='com.intermatik.puzzle.PuzzleApplet.class'  height='"+height+"' width='"+width+"'>";
s+="<param name='baseurl' value='"+baseUrl+"'/>";
s+="<param name='hintenurl' value='"+hinten+"'/>";
s+="<param name='imageid' value='"+imageid+"'/>";
s+="<param name='dimx' value='"+dimx+"'/>";
s+="<param name='dimy' value='"+dimy+"'/>";
s+="<param name='extern' value='"+extern+"'/>";
s+="<param name='heightimg' value='"+heightimg+"'/>";
s+="<param name='widthimg' value='"+widthimg+"'/></applet>";



document.writeln(s);

}

function modPanPosition()
{

var firefox = navigator.userAgent.indexOf('Firefox')>-1 || navigator.userAgent.indexOf('AppleWebKit')>-1  || navigator.userAgent.indexOf('Opera')>-1;
innerW = getInnerWidth('top');
innerH = getInnerHeight('top');
var ff=0;
if(firefox)
{

	parent.document.getElementById('modpan2').style.right = 0; 
	parent.document.getElementById('modpan2').style.bottom=0; 
	innerW -= 50;
	innerH -= 50;
}
else
{

	parent.document.getElementById('modpan2').style.width = innerW; 
	parent.document.getElementById('modpan2').style.height = innerH; 
}
parent.document.getElementById('modpan2').style.left= 0;    
parent.document.getElementById('modpan2').style.top= 0;    
parent.document.getElementById('modpan2').style.visibility = 'visible'; 


maxOPWidth = 1024;

links =  (innerW -  maxOPWidth)/2; //in der mitte zentrieren
if(links < 50) 
	links = 50; //mindestens links 50 abstand
width = maxOPWidth

if( links + maxOPWidth > innerW) 
	width = innerW -2*links; //links und rechts 50  abstand


parent.document.getElementById('modpan').style.left= links;    
parent.document.getElementById('modpan').style.width = width;    
//Spiel iframe
parent.document.getElementById('fotoplayer-pairGame-frame').style.width = width-2;    


maxOPHeight = innerH -100;
oben =  (innerH -  maxOPHeight)/2; 
if(oben < 50) 
	oben = 50; //mindestens oben 50 abstand
height = maxOPHeight
if( oben + maxOPHeight > innerH) 
	height = innerH -2*oben; //oben und unten 50  abstand

parent.document.getElementById('modpan').style.top= oben;    
parent.document.getElementById('modpan').style.height = height; 
//parent.document.getElementById('fotoplayer-pairGame-frame').style.top= oben;    
//parent.document.getElementById('fotoplayer-pairGame-frame').style.height = height;
//Spiel iframe 
parent.document.getElementById('fotoplayer-pairGame-frame').style.height = height-30;   
parent.document.getElementById('modpan').style.visibility = 'visible'; 
parent.scrollbars.visible =false

}

function getInnerWidth(frameName)
{
var x= 0;
	if (top.innerHeight) // all except Explorer
	{
		if(frameName=='top')
			x = top.innerWidth;
		else if(frameName=='self')
			x = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		
	}
	else if (document.body) // other Explorers
	{
		x = top.document.body.clientWidth;
		
		if(frameName=='top')
			x = top.document.body.clientWidth;
		else if(frameName=='self')
			x = self.document.body.clientWidth;
		
	}
	return x;
}

function getInnerHeight(frameName)
{
var y= 0;
	if (top.innerHeight) // all except Explorer
	{
		if(frameName=='top')
			y = top.innerHeight;
		else if(frameName=='self')
			y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		y = document.documentElement.clientHeight;
		
	}
	else if (document.body) // other Explorers
	{
		if(frameName=='top')
			y = top.document.body.clientHeight;
		else if(frameName=='self')
			y = self.document.body.clientHeight;
	}
	return y;
}

function doRaingameApplet(baseUrl,imageid,siteUrl,dimx,dimy,widthimg,heightimg,extern){
var x=1000,y=700;
var randTop=104, randX=150;
if(extern=='J')randTop=0;
if(extern=='S')randTop=0,randX=0;
if (self.innerHeight) // all except Explorer
{
	x = self.innerWidth;
	y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
{
	x = document.documentElement.clientWidth;
	y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
	x = document.body.clientWidth;
	y = document.body.clientHeight;
}


x-=randX;
y-=randTop
var width=dimx*widthimg;
var height=(dimy*heightimg)+(1.5*heightimg);
var merkenW =width;
var merkenH =height;


if(x < width)
{
	height = (x/width)*height ; 
	width = x;
	
}

if(y <  height)
{ 
	width=(y/height)*width ;
	height=y;
	
}
if(extern=='S')width=width-4;

var s="";
s+="<applet archive='../../../game/raingame.zip' code='de.intermatik.fotoRainGame.RainGame'  height='"+height+"' width='"+width+"'>";
s+="<param name='baseurl' value='"+baseUrl+"'/>";
s+="<param name='siteUrl' value='"+siteUrl+"'/>";
s+="<param name='imageid' value='"+imageid+"'/>";
s+="<param name='dimx' value='"+dimx+"'/>";
s+="<param name='dimy' value='"+dimy+"'/>";
s+="<param name='extern' value='"+extern+"'/>";
s+="<param name='heightimg' value='"+heightimg+"'/>";
s+="<param name='widthimg' value='"+widthimg+"'/></applet>";



document.writeln(s);

}


function doMGameApplet(baseUrl,id,hinten,kundenId,extern){
var x=getInnerWidth('self');
var y=getInnerHeight('self');

if(extern == null || extern == 'N')
{
   x-=150;//ggf rand abziehen
   y-=80;//ggf. oberen rand abzeien
}
else y-=30;
var width=1000;
var height=700;
var merkenW =width;
var merkenH =height;


if(x < width)
{
	height = (x/width)*height ; 
	width = x;
	
}
if(extern=='J')width=width-30;	
if(y <  height)
{ 
	width=(y/height)*width ;
	height=y;
	
}
var s="";
s+="<applet archive='../../../game/mGame.zip' code='de.intermatik.mGame.MgameApplet.class'  height='"+height+"' width='"+width+"'>";
s+="<param name='baseurl' value='"+baseUrl+"'/>";
s+="<param name='hintenurl' value='"+hinten+"'/>";
s+="<param name='kundenId' value='"+kundenId+"'/>";
s+="<param name='extern' value='"+extern+"'/>";
s+="<param name='gameId' value='"+id+"'/></applet>";

//alert(s);
document.writeln(s);
}

var defText ="Bitte hier den Text eingeben!";
function makeTextArea(n, text){

	if(text == "")
	text=defText;
	document.writeln(" <TEXTAREA class='input' onfocus='doTextArea(this)' NAME='"+n+"' ROWS='10' COLS='60'>"+text+"</TEXTAREA>");
}
function makeTextArea(n){


	document.writeln(" <TEXTAREA class='input' onfocus='doTextArea(this)' NAME='"+n+"' ROWS='10' COLS='60'></TEXTAREA>");
	document.getElementsByName(n)[0].value="";
}
//bei jedem aufruf wird eine Zeile eingefügt
function addTextArea(n,text){
    var tx = document.getElementsByName(n)[0].value;
    if(tx == defText)
	   tx="";
	if(text.indexOf("@object:")>-1){
		
		 text = text.replace(/&gt;/g,">");
	 	 text = text.replace(/&lt;/g,"<");
     	  text = text.replace(/&amp;/g,"&");
     	  text = text.substring(0,text.indexOf(";")+1);
	 }
     document.getElementsByName(n)[0].value = tx +"\n"+ text;
}
function doTextArea(element){
	  

	if(element.value == defText)
	{
		element.value='';
	}
}
function help(helpId)
{
f = window.open("../../../games/community/de/showHelp.html?helpId="+helpId, "Hilfe", "width=900,height=600,left=50,top=50,scrollbars=yes");
f.focus();
}

function makeHelp(helpId)
{
document.writeln("<A alt ='Information und Hilfe' HREF='javascript:help(\""+helpId+"\")'><IMG SRC='../../../game/help.gif'  ALIGN='BOTTOM'  BORDER='0'></A>");
}

function makeHelpText(texts,helpId)
{
document.writeln("<A alt ='Information und Hilfe' HREF='javascript:help(\""+helpId+"\")'>"+texts+"<IMG SRC='../../../game/help.gif'  ALIGN='BOTTOM'  BORDER='0'></A>");
}

//überprüft die eingaben bei bestellung
function check(){
z = document.getElementsByName("zahlart");
zahlart="";
for(i=0; i< z.length;i++)
{
if(z[i].checked) 
zahlart=z[i].value;
}
t= document.getElementsByName("tarif");
tarif="";
for(i=0; i< t.length;i++)
{
if(t[i].checked) 
tarif=t[i].value;
}


inhaber=  document.getElementsByName("inhaber")[0].value;
kontonr =  document.getElementsByName("kontonummer")[0].value;
blz =  document.getElementsByName("bankleitzahl")[0].value;
gutscheincode =  document.getElementsByName("gutscheincode")[0].value;

if(zahlart == '' )
{
alert("Bitte eine Zahlungsart wählen!");
return false;
}
if(tarif == '' )
{
alert("Bitte eine Mitgliedschaft wählen!");
return false;
}
if(zahlart == 'gutschein' && gutscheincode=='')
{
alert("Bitte gib den Gutscheincode ein!");
return false;
}
if(zahlart == '' && gutscheincode!='')
{
alert("Bitte wähle als Zahlungsart Gutschein!");
return false;
}
if(zahlart == 'bankeinzug' && (inhaber == '' || kontonr==''|| blz==''))
{
alert("Bitte gib die Kontodaten vollständig ein!");
return false;
}
if(zahlart == '' && (inhaber != '' || kontonr!=''|| blz!=''))
{
alert("Bitte wähle als Zahlungsart Bankeinzug aus!");
return false;
}
if(zahlart == 'ueberweisung' && tarif.indexOf(".year")==-1)
{
alert("Überweisung ist nur bei einem Jahresabo möglich!");
return false;
}

return true;
}
function vote(id,sterne){
f = window.open("showVote.html?id="+id+"&sterne="+sterne, "Abstimmen", "width=300,height=100,left=300,top=300,scrollbars=no");
f.focus();
}
//Setzen in Auswahllisten des selected eintrags
function selectList(feld,find)
{

var elem = document.getElementsByName(feld)[0];

for( i = 0; i < elem.options.length;i++)
{
	if(elem.options[i].value == find)
	{
	
		elem.options[i].selected=true;
		}
}
}
//Neuen Eintrag in einer auswahlliste erzeugen
function addEintrag(feld,txt, val)
{
	NeuerEintrag = new Option(txt, val, false, false);
	var elem = document.getElementsByName(feld)[0];
	if(elem!= null)
	elem.options[elem.options.length]=NeuerEintrag;
}

function catSelect(id,name)
{

parent.document.getElementsByName('category')[0].value=id;
parent.document.getElementsByName('categoryShow')[0].value=name;
alert("Die Kategorie "+ name+" wurde ausgewählt!");

}

function openCatSelect(catId)
{
alert('test'+catId);
var catWin = window.open("showCategorySelect.html?catId="+catId,"Kategorie auswählen", "width=300,height=400,left=100,top=200,scrollbars=yes");
alert('test2'+catId);
catWin.focus();
}
//checkboxen liefern keinen namen und wert mit wenn sie nicht angeklickt sind
//mit den beiden Methoden wird wenigstens ein parameter mit leerstring mitgeliefert, wenn die checkbox nicht angehackt ist
function makeCheckBox(key, wert,ausgewaehlt){
var chckd="";
var chckdWert="";
if(ausgewaehlt){
	chckd="checked='checked'";
	chckdWert=" value='"+wert+"' ";
	}
document.writeln("<INPUT TYPE='CHECKBOX' "+chckd+" NAME='"+key+"CB"+"' VALUE='"+wert+"' onClick='javascript:doCheckBox(this)'>");
document.writeln("<INPUT TYPE='HIDDEN' "+chckdWert+"  NAME='"+key+"'>");
}

function doCheckBox(cb){
var wert="";
if(cb.checked)wert=cb.value;
var n = cb.name.substr(0,cb.name.length-2);
document.getElementsByName(n)[0].value=wert;
}


function mGameChange(ziel)
{

	var v =  document.getElementsByName("spielnr")[0];
	var i =  v.selectedIndex;
	var val = Math.abs(v.options[i].value)+100;
	if(ziel == "")
	window.location = "showMGameImagesAdmin.html?mGame="+val+"p1&von=1&bis=50";
	else if(ziel == "userProfil")
	window.location = "showMGame.html?mGameId="+val;

}
function wirklichLoeschen(li)
{
var b = confirm("Soll der Beitrag wirklich gelöscht werden?");
if(b) window.location = li;
}
var pwCheckOK = "---";
var emailCheckOK = "---";
function makeFieldSize(n,v,tp,gr)
{
	var s = "";
	var nTag = n.split(":");
	var css="";
	var pw = "";
	
	if(nTag[0] == "email")
	{
		pw = " onblur='onEmailEntered()' ";
	}
	if(n.indexOf("muss")>-1 )css="class='inputMuss'";
	
	if(n.indexOf("checkbox") >-1)
	{
		css="";
		if(v=="true" || v=="J" || v=="j"  )
		css="checked='checked'"; 
		
		v=nTag[2];
	}
	maxl="";
	if(tp=="text")maxl=" maxlength='"+gr+"'";
	
	s+="<input  type ='"+tp+"' "+maxl+" name='"+nTag[0]+"' size=\""+gr+"\" value='"+v+"' "+css+pw+"/>";  

	s+="<img width=\"0\" hight=\"0\"  src=\"http://www.fotoplayer.de/game/mark.gif\" name=\"i"+nTag[0]+"\"/>";
	//alert(s);

	document.writeln(s);
	felder.push(n);

}


function onEmailEntered()
{
	
		
		if(emailCheckOK == document.getElementsByName("email")[0].value)
			return;
		var pw2 = prompt("Bitte gib deine Emailadresse nochmal ein.","");
		if(pw2 != document.getElementsByName("email")[0].value){
			alert("Die Emailadresse stimmen nicht überein, bitte die Emailadresse neue eingeben.");
			document.getElementsByName("email")[0].value="";
			document.getElementsByName("email")[0].focus();
			
		}
		else
			emailCheckOK = pw2;
	
}
function makeFieldTyp(n,v,tp)
{
makeFieldSize(n,v,tp,20);

}
function makeField(n,v)
{
makeFieldTyp(n,v,'text');
}
function markFail(f)
{
	
	document.getElementsByName("i"+f.name)[0].style.width = "16px";
	document.getElementsByName("i"+f.name)[0].style.height = "16px";
	
}

function checkUpload(f)
{
	
	//width = document.getElementsByName("imgWidth")[0];
	//height = document.getElementsByName("imgHeight")[0];
	//if(width.value != '' && height.value != ''){
	//	alert("Bitte nur einen Wert eingeben!  \"Breite des Bildes im Spiel\" oder \"Höhe des Bildes im Spiel\"!");
	//	markFail(width);
		
	//	markFail(height);
	//	return false;
	
	//}
    community = document.getElementsByName("community")[0];
	meineBilder = document.getElementsByName("meineBilder")[0];
	
	if(community.checked == true && meineBilder.checked == true)
	{
		
		markFail(community);		
		markFail(meineBilder);
		alert("Bitte nur einen Wert auswählen!  \"Auf fotoplayer.de\" oder \"Nur in Meine Bilder\"!");
		return false;
	}

	if(community.checked== false && meineBilder.checked== false)
	{
		
		markFail(community);		
		markFail(meineBilder);
		alert("Bitte einen Wert auswählen!  \"Auf fotoplayer.de\" oder \"Nur in Meine Bilder\"!");
		return false;
	}
	
	url = document.getElementsByName("url")[0];
	if(url.length > 0)
	{
     if(url.value.indexOf("http://")!= 0 && (!url.value.indexOf(".jpg") >-1 || !url.value.indexOf(".jpeg")>-1))	
     {
        markFail(url);				
    	alert("Die Internet Adresse des Fotos muss mit http:// beginnen und mit .jpg oder .jpeg enden!");
    	return false;
     }
	}
    
	return check(f) ;
}

function check(f)
{

	fehler =0;
	muss =0;
	for(count=0; count < f.length;count++)
	{
	
		
		fName = f[count].substring(0,f[count].indexOf(":"));
		fTag =  f[count].substring(f[count].indexOf(":"),f[count].length);
		fValue = document.getElementsByName(fName)[0].value;
		fFeld = document.getElementsByName(fName)[0];
		if(fTag.indexOf("checkbox") >-1){
			fValue = document.getElementsByName(fName)[0].checked;
		}
		if(fTag.indexOf("select") >-1){
			sel = document.getElementsByName(fName)[0];
			
			fValue = sel.options[sel.selectedIndex].text;
			
		}
		
		document.getElementsByName("i"+fName)[0].style.width = "0px";
		document.getElementsByName("i"+fName)[0].style.height = "0px";
		
		if(fTag.indexOf("muss") >-1){
			if(fValue == '' || (fValue == false && fTag.indexOf("checkbox"))){  
			
				markFail(fFeld);
				muss ++;
				continue;
			}
		}
		if(fTag.indexOf("int") >-1){
		 	if(!IsNumeric(fValue)){
			
				markFail(fFeld);
				fehler ++;
			}
		}
		else if(fTag.indexOf("email") >-1){
			if(!isValidEmail(fValue)) 
			{
				
				markFail(fFeld);
				fehler ++;
			}
		}    
		else if(fTag.indexOf("date") >-1){
			if(!isValidDate(fValue)) 
			{
				
				markFail(fFeld);
				fehler ++;
			}
		}
		else if(fTag.indexOf("password") >-1){
			if(fValue.length<5)
			{				
				markFail(fFeld);
				fehler ++;
			}
		}

		
		
	}
	
	if(fehler > 0 || muss > 0){
		s="";

		alert("Ups! Fehlende oder fehlerhafte Eingaben!\nDie betreffenden Felder wurden markiert.");
		return false;
	}
	else return true;
}
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 	if(sText='')return true;
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
     
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
	
      }
   return IsNumber;
   
   }
   
   function isValidEmail(str) {
   	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
   }
   function isValidDate(str) {
   	d = str.split(".");
	dat = new Date(d[2]-1900,d[1]-1, d[0]);
	
	if(dat == null) return false;
	
	if(dat.getYear()+1900 == d[2] && dat.getMonth()+1 == d[1]  && dat.getDate() == d[0])
	{
		return true;
	}
	return false;
	
   	
   }
   
   function entfuehren(xAnz, yAnz, width, height, zBreite,l)
   {
   	w=xAnz*width;
   	h=yAnz*height;
   	neuHeight = ((zBreite+145)/w)*h;
   	if(neuHeight < 300) neuHeight = 300;
   	zBreite = zBreite+145;
   	if(w<h)
   	{
   		neuHeight = zBreite-220;
   		zBreite=((neuHeight/h)*w)+145;
   		
   	}
   	s= "<textarea cols='80' rows='10'> <iframe  src=\""+l+"\"  frameborder=\"1\" width=\""+zBreite+"\" scrolling=\"no\"  height=\""+neuHeight+"\">";
	s = s+"Dein Browser kann keine eingebetteten Frames anzeigen. Mit diesem Link kann das Game trotzdem angezeigt werden.";
	s = s+"<a href=\""+l+"\">anzeigen</a> </iframe><span style='Font-Family : Verdana, Arial ;	Font-Size :8pt;	Color : black ;		Background-Color : white ;'><br/><a style='padding-left: "+(zBreite-95)+"px;' target='_blank' href='http://www.fotoplayer.de'>by Fotoplayer.de</a></span></textarea>";
		
	document.writeln(s);

   	
   }
   
   function entfuehrenAllePuzzle(width, height, l)
   {
   	
   	neuHeight = height;
   	zBreite = width;
   	s= "<textarea cols='80' rows='10'> <iframe  src=\""+l+"\"  frameborder=\"0\" width=\""+zBreite+"\" scrolling=\"no\"  height=\""+neuHeight+"\">";
	s = s+"Dein Browser kann keine eingebetteten Frames anzeigen. ";
	s = s+"<a href=\""+l+"\">anzeigen</a> </iframe><span style='Font-Family : Verdana, Arial ;	Font-Size :8pt;	Color : black ;		Background-Color : white ;'><br/><a style='padding-left: "+(zBreite-95)+"px;' target='_blank' href='http://www.fotoplayer.de'>by Fotoplayer.de</a></span></textarea>";
		
	document.writeln(s);

   	
   }
   
   function createObject(htm)
   {
   		htm = htm.replace(/&gt;/g,">");
   		htm = htm.replace(/&lt;/g,"<");   
   		document.writeln(htm);		
   }
 
function Preview(u, hoehe,prev1) {
  this.u = u;
  this.hoehe = hoehe;
  this.prev1=prev1;
  
}

   function nextGame(spiele)
   {
		game=spiele.shift();
		spiele.push(game);
		if(spiele[0] =='ende'){nextGame(spiele);return; }		
		window.previewGame.location=spiele[0].u;				
		document.getElementsByName("previewGame")[0].style.height=spiele[0].hoehe;		
   }
   function game(spiele)
   {
		
		if(spiele[0] =='ende'){nextGame(spiele); }		
		window.location=spiele[0].u.replace(/showGameOnStart/g,'showGame');				
		
   }
     function foto(spiele)
   {
		
		if(spiele[0] =='ende'){nextGame(spiele); }		
		window.location=spiele[0].u.replace(/showGameOnStart/g,'showGameImage');				
		
   }
   function firstGame(spiele)
   {
		
		if(spiele[0] =='ende'){nextGame(spiele);return; }		
				
		document.getElementsByName("previewGame")[0].style.height=spiele[0].hoehe;		
   }
	
   function showPrev(){
   
    
    document.getElementsByName("previewGame")[0].style.height = spiele[0].hoehe + 120;
   
   }
   function abbruchPrev(){
   
	document.getElementsByName("previewGame")[0].style.height =    spiele[0].hoehe    ;
   
   }
   function removeAmpEntity(text){
   	return text.replace('&amp;','&');
   }

   function isMarkPoint(timeSec, duration,triesA, triesB, errorsA,errorsB)
   {
   	return (timeSec == duration && triesA == triesB && errorsA == errorsB);
	
   }
