function sendajaxmail(vmod,vitem,vpage) {

	v_page = vpage;
	v_mod = vmod;
	v_item = vitem;
	v_email = document.getElementById('email').value;
	window.setTimeout('x_sendajaxmail(v_email,v_mod,v_item,v_page,sendajaxmail_cb)',1000);
	document.getElementById('box_sendajaxmail').innerHTML = '<'+'div id="waitLayer" style="width:100%; position:absolute; top:0; left:0; height:'+(document.getElementById('box_sendajaxmail').offsetHeight - 2)+'px; background-color:#fff;"'+'><'+'div style="padding:75px 5px 5px 90px;"'+'><img src="/pics/loading.gif" alt="" /> Bitte warten.<br />Die E-Mail wird verschickt.<'+'/div><'+'/div>' + document.getElementById('box_sendajaxmail').innerHTML;
	return false;

};

function sendajaxmail_cb(new_data) {

	if(new_data == 'wrong_email') {
		document.getElementById('box_sendajaxmail').innerHTML = '<'+'span class="msg_negativ">Sie haben eine ung&uuml;ltige E-Mail-Adresse angegeben. Versuchen Sie es bitte erneut.<'+'/span><br /><br />' + box_sendajaxmail_inhalt;
	}

	else if(new_data == 'zeitsperre') {
		document.getElementById('box_sendajaxmail').innerHTML = '<'+'span class="msg_negativ">Sie haben in den vergangenen 15 Minuten bereits zwei E-Mails an die eingegebene Adresse geschickt. Aus Sicherheitsgr&uuml;nden d&uuml;rfen maximal zwei E-Mails innerhalb von 15 Minuten verschickt werden. Bitte haben Sie ein paar Minuten Geduld.<'+'/span><br /><br />' + box_sendajaxmail_inhalt;
	}

	else {
		document.getElementById('box_sendajaxmail').innerHTML = '<'+'span class="msg_positiv">Die E-Mail wurde 	erfolgreich verschickt.<'+'/span><br /><br />' + box_sendajaxmail_inhalt;
	}

};



function copy(inElement) {

	if(document.getElementById(inElement)) {

		  if (inElement.createTextRange) {
			var range = inElement.createTextRange();
			if (range && BodyLoaded==1)
			 range.execCommand('Copy');
		  } else {
			var flashcopier = 'flashcopier';
			if(!document.getElementById(flashcopier)) {
			  var divholder = document.createElement('div');
			  divholder.id = flashcopier;
			  document.body.appendChild(divholder);
			}
			document.getElementById(flashcopier).innerHTML = '';
			var divinfo = '<'+'embed src="/html/clipboard.swf" FlashVars="clipboard='+escape(document.getElementById(inElement).value)+'" width="0" height="0" type="application/x-shockwave-flash"'+'><'+'/embed>';
			document.getElementById(flashcopier).innerHTML = divinfo;
		  }

	};

}






function toggleImgLinks() {

	document.getElementById('showstats').style.display = 'none';
	
	if(document.getElementById('showimglinks').style.display == 'none') {

		Effect.Appear('showimglinks',{duration:0.6});
		document.getElementById('showcontainer').style.MozOpacity = '0.2';
		document.getElementById('banner').style.MozOpacity = '0.2';

	}

	else {

		Effect.Fade('showimglinks',{duration:0.6});
		document.getElementById('showcontainer').style.MozOpacity = '1'; document.getElementById('banner').style.MozOpacity = '1';

	};

}



function toggleStats() {

	document.getElementById('showimglinks').style.display = 'none';

	if(document.getElementById('showstats').style.display == 'none') {

		Effect.Appear('showstats',{duration:0.6});
		document.getElementById('showcontainer').style.MozOpacity = '0.2';
		document.getElementById('banner').style.MozOpacity = '0.2';

	}

	else {

		Effect.Fade('showstats',{duration:0.6});
		document.getElementById('showcontainer').style.MozOpacity = '1';
		document.getElementById('banner').style.MozOpacity = '1';

	};

}




function hideUploadForm(mod) {

	if(mod == 'einzelbild') { newHeight = 250; }
	else if(mod == 'galerie') { newHeight = 230; }
	else if(mod == 'galerie_bottom') { newHeight = 150; }
	else { newHeight = 145; };

	document.getElementById('box_uploadfieldset').style.display = 'none';
	document.getElementById('reservedWaitLayer').innerHTML = '<'+'div id="waitLayer" style="height:'+newHeight+'px; background-color:#fff;"'+'><'+'div style="padding:75px 5px 5px 90px; background:url(/pics/loading.gif) no-repeat 65px 79px;"'+'>Bitte warten.<br />Die Datei wird hochgeladen.<'+'/div><'+'/div>';
	
}