function show_window(id) {
 if (document.getElementById('fotowindow')) {
//  	document.getElementById('fotowindow').visibility="hidden";
//  	clas=document.getElementById('fotowindow').className;
//  	document.getElementById('fotowindow').className=clas+" hiddenno";
 	}
 }

var request = false;
var bildgrurl=null;
var bildsmurl=null;
var id=null;
var requesturl = "fileadmin/script/iptc_test.php?makeconf=2&user=test&passwort=test32";
requesturl="fileadmin/script/speicher.php";
//var domain="http://pho.pcboy.de/";
var domain="http://www.perfectphoto.de/";

function add_request (add)  {
// alert(add);
 setRequest_url('','fileadmin/script/iptc_test_03.php?'+add+'&user='+document.getElementById('tid0_username').value+'&passwort='+document.getElementById('tid0_password').value);
 }

function add_request_abbrechen(add) {
if (add.length>1) {
   tr="&";
   }	
   else {
   add="";
   tr="";
   }

 setRequest_url('','fileadmin/script/iptc_test_03.php?user='+document.getElementById('tid0_username').value+'&passwort='+document.getElementById('tid0_password').value+tr+add);

}

function add_request_formadd (add)  {
if (add.length>1) {
   tr="&";
   }	
   else {
   add="";
   tr="";
   }
// add="";
// tr="";
 if (document.getElementById('foid_user')) {
	add = add+tr+document.getElementById('foid_user').value;
	tr="&";
 	}
 	
 if (document.getElementById('foid_head')) {
	add = add+tr+"head="+document.getElementById('foid_head').value;
	tr="&";
 	}


 if (document.getElementById('foid_datum_t')) {
	add = add+tr+"datum_t="+document.getElementById('foid_datum_t').value;
	tr="&";
 	}


 if (document.getElementById('foid_datum_m')) {
	add = add+tr+"datum_m="+document.getElementById('foid_datum_m').value;
	tr="&";
 	}

 if (document.getElementById('foid_datum_y')) {
	add = add+tr+"datum_y="+document.getElementById('foid_datum_y').value;
	tr="&";
 	}

 if (document.getElementById('foid_text')) {
	add = add+tr+"text="+document.getElementById('foid_text').value;
	tr="&";
 	}


 if (document.getElementById('foid_keywords')) {
	add = add+tr+"keywords="+document.getElementById('foid_keywords').value;
	tr="&";
 	}


 if (document.getElementById('foid_uid')) {
	add = add+tr+"uid="+document.getElementById('foid_uid').value;
	tr="&";
 	}

hiddenbox = "";

add = add+tr+"hidden="+document.bildge.hidden[0].value; 	
if(document.bildge.hidden[0].checked == true)
    hiddenbox = 1;
 else if(document.bildge.hidden[1].checked == true)
  hiddenbox = 0;
add = add+tr+"hidden="+hiddenbox; 	


rechtebox = "";
if(document.bildge.rechte[0].checked == true)
    rechtebox = document.bildge.rechte[0].value;
  else if(document.bildge.rechte[1].checked == true)
    rechtebox = document.bildge.rechte[1].value;
  else if(document.bildge.rechte[2].checked == true)
    rechtebox = document.bildge.rechte[2].value;
  else if(document.bildge.rechte[3].checked == true )
    rechtebox = document.bildge.rechte[3].value;

kategorie="";    
if (document.bildge.kategroie[0].checked==true) {
    kategorie = kategorie+tr+"kategroie[]="+document.bildge.kategroie[0].value;
    }

if (document.bildge.kategroie[1].checked==true) {
    kategorie = kategorie+tr+"kategroie[]="+document.bildge.kategroie[1].value;
    }

for (var i = 0; i < document.bildge.kategroie.length ; i++ ){
    if (document.bildge.kategroie[i].checked==true) {
    	kategorie = kategorie+tr+"kategroie[]="+document.bildge.kategroie[i].value;
    	}
    }

 add = add + tr + kategorie;
 add = add+tr+"rechte="+rechtebox; 	
 add = add+tr+"control=update_ttnews";

 setRequest_url('','fileadmin/script/iptc_test_03.php?'+add+'&user='+document.getElementById('tid0_username').value+'&passwort='+document.getElementById('tid0_password').value);
 }

 	
function request_login (id) {
 if (id=="copyrigth") { 
 if (document.getElementById('tid0_username') && document.getElementById('tid0_password')) {

    setRequest_url('','fileadmin/script/iptc_test_03.php?makeconf=2&user='+document.getElementById('tid0_username').value+'&passwort='+document.getElementById('tid0_password').value+"&layout=copyright");
    }
 }
 if (id=="verzeichniss") { 
 if (document.getElementById('tid0_username') && document.getElementById('tid0_password')) {
    setRequest_url('','fileadmin/script/iptc_test_03.php?makeconf=2&user='+document.getElementById('tid0_username').value+'&passwort='+document.getElementById('tid0_password').value+"&layout=verzeichniss");
    }
 }
 }


function setRequest_url(control,url) {

if (document.getElementById('leuchkastenanfrage_content'))  {
   }
if (document.getElementById('leuchkastenanfrage_content_login'))  {
   }
		// Request erzeugen
		if (window.XMLHttpRequest) {
			request = new XMLHttpRequest(); // Mozilla, Safari, Opera
		} else if (window.ActiveXObject) {
			try {
				request = new ActiveXObject('Msxml2.XMLHTTP'); // IE 5
			} catch (e) {
				try {
					request = new ActiveXObject('Microsoft.XMLHTTP'); // IE 6
				} catch (e) {}
			}
		}



		// überprüfen, ob Request erzeugt wurde
		if (!request) {
//			alert("Kann keine XMLHTTP-Instanz erzeugen");
			return false;
		} else {
			// Request öffnen
			request.open('post', url, true);
			// Requestheader senden
			request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			// Request senden
			request.send(control);
			// Request auswerten
			request.onreadystatechange = interpretRequest;
		}
	}


	function setRequest(control) {
if (document.getElementById('leuchkastenanfrage_content'))  {
   }
if (document.getElementById('leuchkastenanfrage_content_login'))  {
   }
		// Request erzeugen
		if (window.XMLHttpRequest) {
			request = new XMLHttpRequest(); // Mozilla, Safari, Opera
		} else if (window.ActiveXObject) {
			try {
				request = new ActiveXObject('Msxml2.XMLHTTP'); // IE 5
			} catch (e) {
				try {
					request = new ActiveXObject('Microsoft.XMLHTTP'); // IE 6
				} catch (e) {}
			}
		}



		// überprüfen, ob Request erzeugt wurde
		if (!request) {
//			alert("Kann keine XMLHTTP-Instanz erzeugen");
			return false;
		} else {
			var url = "fileadmin/script/speicher.php";
			// Request öffnen
			request.open('post', url, true);
			// Requestheader senden
			request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			// Request senden
			request.send(control);
			// Request auswerten
			request.onreadystatechange = interpretRequest;
		}
	}


	// Request auswerten
	function interpretRequest() {
		switch (request.readyState) {
			// wenn der readyState 4 und der request.status 200 ist, dann ist alles korrekt gelaufen
			case 4:
				if (request.status != 200) {
					
					alert("Der Request wurde abgeschlossen, ist aber nicht OK\nFehler:"+request.status);
				} else {
					var content = request.responseText;
					// den Inhalt des Requests in das <div> schreiben
					if (document.getElementById('leuchkastenanfrage_content'))  {
					 document.getElementById('leuchkastenanfrage_content').innerHTML = content;
					 }else if (document.getElementById('leuchkastenanfrage_content_login'))  {
					  document.getElementById('leuchkastenanfrage_content_login').innerHTML = content;
					 }
					 else {
					 if (content.search('sciptnameid=foto_intern')!=-1) {
					        document.getElementById('foto_intern').innerHTML = content;										 
					 	} else if (content.search('sciptnameid=user_edit')!=-1) {
					      document.getElementById('user_edit').innerHTML = content;										 
					      } else if (content.search('sciptnameid=read_verzeichniss')!=-1) {
					      document.getElementById('read_verzeichniss').innerHTML = content;										 
					      } else {
					      document.getElementById('leuout').innerHTML = content;					
					      }

					 }
				}
				break;
			default:
				break;
		}
	}










 
function setdel(id,name,namesm) {
 id.innerHTML = "löschen";
 da = id.parentNode.firstChild;
 da.src = "fileadmin/templates/img/master/ordersub.jpg";
 
 setRequest('orname='+name+'&control=addimg&smname='+namesm);
 if (document.getElementById("leustatus")) {
 	we = document.getElementById("leustatus").className.split(" ");
 	document.getElementById("leustatus").className = we[0]+" hidden";
 	} 
 }

function setadd(id,name,namesm) {
 id.innerHTML = "speichern";
 da = id.parentNode.firstChild;
 da.src = "fileadmin/templates/img/master/orderadd.jpg";
 
 setRequest('orname='+name+'&control=delimg&smname='+namesm);
 if (document.getElementById("leustatus")) {
 	we = document.getElementById("leustatus").className.split(" ");
 	document.getElementById("leustatus").className = we[0]+" hidden";
 	} 
}

function setaktion (id,name,namesm) {
// alert(id);
name=domain+name;
namesm=domain+namesm;

if (bildbig.get_Bigname()==name) {
bildbig.setaktiongr (id,name,namesm);
} else
 {
 if (test_aktion(name,namesm)=="add") {
    setdel(id,name,namesm);	
    } else
    {
    setadd(id,name,namesm);	
    }	
 }
} 

function delall() {
 setRequest('control=delall');
 if (document.getElementById("leustatus")) {
 	we = document.getElementById("leustatus").className.split(" ");
 	document.getElementById("leustatus").className = we[0];
 	}
 makeaddbuttonall(); 
 bildbig. del_All_Control();		
 }

function test_aktion (name,namesm) {
 var leu1;
 var back="add";
// alert(document.getElementById("leuout").innerHTML);
 //alert(name+" "+namesm); 
 if (document.getElementById("leuout")) {
	leu1 = document.getElementById("leuout").firstChild;
	while (leu1 != null ) {
	  
	      if (leu1.src != null)	{
	      	 if (leu1.src.search(namesm) != -1) {
	 	    back="sub";
		    }
		 }
	      leu1 = leu1.nextSibling;
	      }
        }
 return (back);
 }

 function makeaddbuttonall() {
 var leu;
 var con01;
 var du;
 var we6;
 if (document.getElementById("newsingleco")) {
    con01 = document.getElementById("newsingleco").firstChild;
    while (con01 != null) {			
          du=con01.firstChild.firstChild;	
	  we6=con01.innerHTML;
	  ersetzt_aktion(con01,"add");				
	  con01 = con01.nextSibling;
	  }
     }		
 }
 
 
 function str_replace(search, replace, subject) {

    return subject.split(search).join(replace);
}
 
 var deltime=1000;
 
function makedellbutton() {
 var leu;
 var con01;
 var du;
 var we6;
 if (document.getElementById("leuout") && document.getElementById("newsingleco")) {
	leu = document.getElementById("leuout").firstChild;
	if (leu==null) { 
//	aktiv = window.setInterval("makedellbutton()", 1000);
	aktiv = window.setTimeout("makedellbutton()", 1000);

	return;
	};

//	alert("jj2");
//	 alert(leu.innerHTML);
		while (leu != null) {	
		con01 = document.getElementById("newsingleco").firstChild;
		while (con01 != null) {	
		       		
			du=con01.firstChild;
			du=du.firstChild;
			du=du.firstChild;
//			alert(du.innerHTML+" "+leu.src);
			bilsrc=leu.src;
//			if (bilsrc!=null) { 
//                           a=bilsrc.split(".de/");
//                           bilsrc=a[1];
//                            }
//			if (bilsrc!=null) {bilsrc=str_replace(domain,"",bilsrc);}
//			alert(" d="+du.src+" ab="+bilsrc);

//			if (du.src==bilsrc && bilsrc!=null) {
			if (du.src==bilsrc) {

//			        alert("del");
				we6=con01.innerHTML;
				ersetzt_aktion(con01,"sub");				
				}
			con01 = con01.nextSibling;
			}
		leu = leu.nextSibling;
		}

	}		
 bildbig.initimage();
// alert("ende");
 }

function ersetzt_aktion(id,cont){
 var chi;
 var we8;
 if (id != null) { 
	if (cont=="sub") {
	   chi=id.firstChild;
	   chi=chi.nextSibling;	 
	   we8=chi.innerHTML;  
	   we8=we8.replace(/speichern/,"löschen");
	   we8=we8.replace(/orderadd.jpg/,"ordersub.jpg");	
	   chi.innerHTML=we8;  
	   }
	if (cont=="add") {
	   chi=id.firstChild;
	   chi=chi.nextSibling;	 
	   we8=chi.innerHTML;  
	   we8=we8.replace(/löschen/,"speichern");
	   we8=we8.replace(/ordersub.jpg/,"orderadd.jpg");	
	   chi.innerHTML=we8;  
	   }  	
	}
 }

/*
*****************  Login ************
*/


function change_classname(id,classna){
//alert(id);
//if (document.getElementById(id)) {
	id.className = classna;
//    }
 }


/*
*************** erzeuge vergrößerung **********
*/


function bildshow (id) {
// alert(id.href);
bildgrurl=id.firstChild.src;
bildsmurl=id.href;
//alert(bildgrurl+" "+bildsmurl);
// alert(id.href);

da = id.parentNode;
da = da.parentNode;
da = da.firstChild;
da = da.nextSibling;
da = da.firstChild;
//da = da.nextSibling;

// alert(da.innerHTML);


 if (document.getElementById("loginimage")) {
    html="<img src=\""+id.href+"\" height=\"300\" />";
    html="<img src=\""+id.href+"\" />";
    html=html+"<div class=\"logincontrol\" >";
    html=html+"<table  class=\"logincontroltab\" cellspacing=\"0\" cellpadding=\"0\" ><tr><td  width=\"20%\" align=\"left\" valign=\"middle\" ><img src=\"fileadmin/templates/img/master/pfeilleft.gif\" alt=\"\"  class=\"backcontrolleft\" /><a href=\"#\" onclick=\"bildbig.backIm();return (false);\" >zurück</a></td>";
    html=html+"<td width=\"60%\" valign=\"middle\" ><img src=\"fileadmin/templates/img/master/ordersub.jpg\" alt=\"\" class=\"backcontrolsave\" /><a href=\"#\" onclick=\"bildbig.setaktiongr();return (false);\" >speichern</a></td>";
    html=html+"<td width=\"20%\" align=\"right\" valign=\"middle\" ><a href=\"#\" onclick=\"bildbig.nextIm();return (false);\" >vor</a><img src=\"fileadmin/templates/img/master/pfeilright.gif\" class=\"backcontrolright\" alt=\"\" /></td></tr></table>";
    html=html+"</div>";
    document.getElementById("loginimage").innerHTML=html; 	
    }
 }
// Onload 

function setaktiongr(id) {

// alert(bildbig.get_Smname());
// alert(bildbig.get_Bigname());
 setaktion ("",bildbig.get_Bigname(),bildbig.get_Smname());
 }
 
/*
function imgback() {
// alert("back");
 }

function imgnext() {
// alert("next");
 }
 */ 


//***************************
// Classe small Start
// Construktor
function smallimage(smallimg,bigimg,eid) {
/*
 if (eid==null) {
  if (document.getElementById("newsingleco")) {
//     alert(document.getElementById("newsingleco").innerHTML);
     }
 }
 */
 this.constructor = smallimage;
 this.get_Next_Id = get_Next_Id;
 this.get_First_Id = get_First_Id;
 this.get_Back_Id = get_Back_Id;
 this.get_Last_Id = get_Last_Id;
 this.get_Img_Name_Small = get_Img_Name_Small;
 this.get_Img_Name_Big = get_Img_Name_Big;
 
 this.bild_Id = bild_Id;
 this.bild_Status = bild_Status;
 this.set_Bild_Status = set_Bild_Status;
 this.sm = smallimg;
 this.big = bigimg;
 this.eid = eid;
 
 this.spstatus = null;
 }
 
 
 
//**** get_Next_Id ***
// Hole das näcste Bild OBJKET
function get_Next_Id() {
 if (this.eid==null) {
    this.get_First_Id();
    }
    else
    {
    this.eid=this.eid.nextSibling;
    if (this.eid==null) { this.get_First_Id();}
    }
// alert(this.eid.innerHTML);
 }
 
//**** get_First_Id ***
// Hole das erste Bild OBJEKT
function get_First_Id() {
 if (document.getElementById("newsingleco")) {
    this.eid=document.getElementById("newsingleco").firstChild;
    }
 return this.eid;
 }

//**** get_Last_Id ***
// Hole das letzte Bild OBJEKT
function  get_Last_Id() {
  if (document.getElementById("newsingleco")) {
     this.eid=document.getElementById("newsingleco").lastChild;
     }
 return this.eid;
 }

//**** get_Img_Name_Big ***
// Hole den Namen des Bildes Groß
function get_Img_Name_Big() {
 back=null;
 if (this.eid!=null) {
 	da=this.eid.firstChild;
 	da=da.firstChild;
 	back=da.href;
 	}
  return back;
}

//**** bild_Id ***

function bild_Id() {
 return (this.eid);
 }
 
function bild_Status() {
 back = null;
 if (this.eid!=null) {
 	da=this.eid.firstChild;
 	da=da.nextSibling;
 	da=da.firstChild;
	back=da.src; 	
 	da=da.nextSibling;
 	back=da.innerHTML;	
 	}
 return  back;
 }

function set_Bild_Status(bild,text) {
 if (this.eid!=null) {
 	da=this.eid.firstChild;
 	da=da.nextSibling;
 	da=da.firstChild;
	da.src=bild; 	
 	da=da.nextSibling;
 	da.innerHTML=text;	
 	}
}






//**** get_Img_Name_Small ***
function get_Img_Name_Small() {
 back=null;
 if (this.eid!=null) {
	da=this.eid.firstChild;
 	da=da.firstChild;
 	da=da.firstChild;
	 	
// 	alert(da.src);
 	back=da.src;
 	}
 return back;
}

function get_Back_Id() {
 if (this.eid==null) {
	this.eid=this.get_First_Id();
 	}
     else
      {
      this.eid=this.eid.previousSibling;
      if (this.eid==null) {this.get_Last_Id();};
      }
// alert(this.eid.innerHTML);   
 }
 
// Classe small ende
//***************************


//****************************
//****** Class Request Start

function setRequestClass () {
this.set = set;
 }

// ******* Request senden
function set(control) {
 // Request erzeugen
// alert(control);
 if (window.XMLHttpRequest) {
	 request = new XMLHttpRequest(); // Mozilla, Safari, Opera
	 } else if (window.ActiveXObject) {
	 try {
	     request = new ActiveXObject('Msxml2.XMLHTTP'); // IE 5
		 } catch (e) {
			try {
				request = new ActiveXObject('Microsoft.XMLHTTP'); // IE 6
				} catch (e) {}
			}
		}
		// überprüfen, ob Request erzeugt wurde
 if (!request) {
	alert("Kann keine XMLHTTP-Instanz erzeugen");
	return false;
	} else {
	var url = "fileadmin/script/speicher.php";
	// Request öffnen
	request.open('post', url, true);
	// Requestheader senden
	request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	// Request senden
	request.send(control);
	// Request auswerten
	request.onreadystatechange = interpretRequest;
	}
 }

//****** Class Request Ende
//****************************

//****************************
//****** Class Leuchtkasten Start

function imgwindow() {
 this.constructor = imgwindow; 
 // Classen
 this.request = new setRequestClass();
 // fuction 
 this.isThere = isThere;
 this.setAdd = setAdd;
 this.setDel = setDel;
 // Constanten
 this.leuchtID ="leuout";
 }

function setAdd(id,name,namesm) {
 this.request.set('orname='+name+'&control=addimg&smname='+namesm);
 }

function setDel(id,name,namesm) {
 this.request.set('orname='+name+'&control=delimg&smname='+namesm);
 }

// Sucht eine namen im Leuchtkasten und gibt wenn er nicht da ist add aus
function isThere (name) {
 var leu1;
 var backw="add";
// alert(name);
// alert(document.getElementById(this.leuchtID).innerHTML);
 if (document.getElementById(this.leuchtID)) {
	leu1 = document.getElementById(this.leuchtID).firstChild;
	while (leu1 != null ) {
	      if (leu1.src != null)	{
		     if (leu1.src==name) {
			 	backw="sub";
				leu1=document.getElementById(this.leuchtID).lastChild;
			 	};
		 	 }
	      leu1 = leu1.nextSibling;
	      }
        }
 return (backw);
 }

//****** Class Leuchtkasten ende
//****************************

//***************************
// Classe big Start
 
function bigimage(smallimg) {
 this.bilder = new Array();
 this.constructor = bigimage; 
 this.search = new smallimage("","",null); 
 this.bildmark = new smallimage("","",null); 
 this.leuchtkasten = new imgwindow(); 
 // functionen 
 this.nextIm = nextIm;
 this.backIm = backIm; 
 this.setcontrol = setcontrol;
 this.initimage = initimage;
 this.setimage = setimage;
 this.get_Bigname = get_Bigname;
 this.get_Smname = get_Smname;
 this.get_Id = get_Id;
 this.setaktiongr = setaktiongr;
 this.del_All_Control =  del_All_Control;
 // constanten 
 this.delimg="fileadmin/templates/img/master/ordersub.jpg";
 this.addimg="fileadmin/templates/img/master/orderadd.jpg";
 this.deltext="löschen";
 this.addtext="speichern";
 }

function del_All_Control() {
    name = this.bildmark.get_Img_Name_Big();
 	this.setcontrol(name,this.addimg,this.addtext);
}


function setaktiongr() {
// alert("setaktiongr");
 name=this.bildmark.get_Img_Name_Big();
 namesm=this.bildmark.get_Img_Name_Small();
 id=this.bildmark.bild_Id();
 if ("add"==this.leuchtkasten.isThere(namesm))	{
	this.leuchtkasten.setAdd(id,name,namesm);
    this.setcontrol(name,this.delimg,this.deltext);
	this.bildmark.set_Bild_Status(this.delimg,this.deltext);
    } else {
    this.leuchtkasten.setDel(id,name,namesm);	
 	this.setcontrol(name,this.addimg,this.addtext);
	this.bildmark.set_Bild_Status(this.addimg,this.addtext);
    }
// this.bildmark.get_Next_Id();
// this.nextIm();
 }

function  get_Bigname() {
 return (this.bildmark.get_Img_Name_Big());
 }
function  get_Smname() {
 return (this.bildmark.get_Img_Name_Small());
 }
function  get_Id() {
 return (this.bildmark.get_Back_Id());
 }


function setimage(id) {
 this.search.get_First_Id();
 bild=null;
 while (bild!=id) {
       bild=id;
       bild = this.search.get_Img_Name_Big();
       this.search.get_Next_Id();	       
       }
 this.search.get_Back_Id()     
 this.bildmark=this.search;
 img=this.bildmark.get_Img_Name_Big();
 imgs= this.delimg;
 status01=this.bildmark.bild_Status();
// alert(status01+" setimage");
 if (status=="speichern") {
    imgs= this.addimg;
    }
 this.setcontrol(img,imgs,status01);

// alert(id+" "+this.search.get_Img_Name_Big());
// this.bildmark=this.search.get_Back_Id();
 }


function initimage() {
 this.nextIm();
 }


function setcontrol(pic,sp,text) {
 if (document.getElementById("loginimage")) {
    html="<img src=\""+pic+"\" height=\"300\" />";
    html="<img src=\""+pic+"\"  />";

    html=html+"<div class=\"logincontrol\" >";
    html=html+"<table  class=\"logincontroltab\" cellspacing=\"0\" cellpadding=\"0\" ><tr><td  width=\"20%\" align=\"left\" valign=\"middle\" ><img src=\"fileadmin/templates/img/master/pfeilleft.gif\" alt=\"\"  class=\"backcontrolleft\" /><a href=\"#\" onclick=\"bildbig.backIm();return (false);\" >zurück</a></td>";
    html=html+"<td width=\"60%\" valign=\"middle\" ><img src=\""+sp+"\" alt=\"\" class=\"backcontrolsave\" /><a href=\"#\" onclick=\"bildbig.setaktiongr();return (false);\" >"+text+"</a></td>";
    html=html+"<td width=\"20%\" align=\"right\" valign=\"middle\" ><a href=\"#\" onclick=\"bildbig.nextIm();return (false);\" >vor</a><img src=\"fileadmin/templates/img/master/pfeilright.gif\" class=\"backcontrolright\" alt=\"\" /></td></tr></table>";
    html=html+"</div>";
    document.getElementById("loginimage").innerHTML=html; 	
    }
 }

function nextIm() {  
 this.bildmark.get_Next_Id();
 img=this.bildmark.get_Img_Name_Big();
 imgs="fileadmin/templates/img/master/ordersub.jpg"
 sta_bi=this.bildmark.bild_Status();
 if (sta_bi=="speichern") {
    imgs="fileadmin/templates/img/master/orderadd.jpg"
    }
 this.setcontrol(img,imgs,sta_bi);
 }

function backIm() {
 this.bildmark.get_Back_Id();
 img=this.bildmark.get_Img_Name_Big();
 imgs="fileadmin/templates/img/master/ordersub.jpg"
 sta_bi=this.bildmark.bild_Status();
 if (sta_bi=="speichern") {
    imgs="fileadmin/templates/img/master/orderadd.jpg"
    }
 this.setcontrol(img,imgs,sta_bi);
// alert("je");
 }

// Classe big ende
//***************************







var bildsmall = new smallimage("","",null);
var bildbig = new bigimage(null);
var leuchtkasten = new imgwindow(); 




//***************** Login Fehler 

function loginprint() {

//location.href = "#login_anker";
if (document.getElementById("logintexte")) {
	document.getElementById("logintexte").innerHTML="Zum Ausdrucken der Lowres-Bilder bitte einloggen!";
	cl=document.getElementById("logintexte").className.split(" "); 	
 	document.getElementById("logintexte").className = cl[0]+" loginMedlung";
	}

}


function loginhires() {
//location.href = '#login_anker';
if (document.getElementById("logintexte")) {
	document.getElementById("logintexte").innerHTML="Zum Downloaden der Hires-Bilder bitte einloggen!";
	cl=document.getElementById("logintexte").className.split(" "); 	
 	document.getElementById("logintexte").className = cl[0]+" loginMedlung";
	}

}

function loginlowres() {
location.href = '#login_anker';
if (document.getElementById("logintexte")) {
	document.getElementById("logintexte").innerHTML="Zum Downloaden der Lowres-Bilder bitte einloggen!";
	cl=document.getElementById("logintexte").className.split(" "); 	
 	document.getElementById("logintexte").className = cl[0]+" loginMedlung";
	}

}



//*********************
//*********************
//*********************
//*********************
