//Initial js functions to run when js document is loaded

//Load when the page is ready - Using jQuery to run events
$(document).ready(function(){
						   
parseCode('thickbox-code/thickbox.js','ajaxJS');
parseCode('thickbox-code/thickbox.css','ajaxCSS');
parseCode('thickbox-code/thickbox-compressed.js','ajaxJSCompressed');
			  		  
//$('div.roundbox2').corner('round 9px',"#1c2225");
//$('div.roundbox4').corner('round 9px',"#1c2225");
//$('div.roundbox3').corner('round 9px',"#1c2225");
//$('div.round').corner('round 9px',"#1c2225");
//$('div.sliderGallery').corner('round left 9px',"RGB(97,97,97)");
});


///////////////////////////  ajax call to get code off the server for display dependent code ///////////////////////////////////////
function parseCode(o,placement){

	$.get(o,function(code){										  	   
		  code=code.replace(/&/mg,'&#38;');
		  code=code.replace(/</mg,'&#60;');
		  code=code.replace(/>/mg,'&#62;');
		  code=code.replace(/\"/mg,'&#34;');
		  code=code.replace(/\t/g,'  ');
		  code=code.replace(/\r?\n/g,'<br>');
		  code=code.replace(/<br><br>/g,'<br>');
		  code=code.replace(/ /g,'&nbsp;');
		 $('#'+placement).html(code);
	}
	);
 }




///////////////////////////  round corners jquery plugin ////////////////////////////////////////////////////////////////////////////////
$.fn.corner = function(o,col)
{

	o = o || "";
	var clr = col;
	var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10;
	var fx = (o.match(/round|bevel|fold|notch/)||["round"])[0];
	var opts = {
		TL:		/top|tl/i.test(o), 		TR:		/top|tr/i.test(o),
		BL:		/bottom|bl/i.test(o),	BR:		/bottom|br/i.test(o)//,
	};
	if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
		opts = { TL:1, TR:1, BL:1, BR:1 };
	var strip = document.createElement("div");
	strip.style.overflow = "hidden";
	strip.style.height = "1px";
	strip.style.backgroundColor = "transparent";
	strip.style.borderStyle = "solid";
	return this.each(function(){
		var pad = {
			T: parseInt($.css(this,"paddingTop"))||0,
			R: parseInt($.css(this,"paddingRight"))||0,
			B: parseInt($.css(this,"paddingBottom"))||0,
			L: parseInt($.css(this,"paddingLeft"))||0
		};
		strip.style.borderColor = clr;
		if ( opts.TL || opts.TR ) {
			strip.style.borderStyle = "none "+(opts.TR?"solid":"none")+" none "+(opts.TL?"solid":"none");
			var t=document.createElement("div");
			t.style.margin = "-"+pad.T+"px -"+pad.R+"px "+(pad.T-width)+"px -"+pad.L+"px";
			t.style.backgroundColor = "transparent";
			for ( var i=0; i < width; i++ ) {
				var w = fx=="round" ? Math.round(width*(1-Math.cos(Math.asin(i/width)))) : i+1;
				var e = strip.cloneNode(false);
				e.style.borderWidth = "0 "+(opts.TR?w:0)+"px 0 "+(opts.TL?w:0)+"px";
				t.insertBefore(e, t.firstChild);
			}
			this.insertBefore(t, this.firstChild);
		}
		if ( opts.BL || opts.BR ) {
			strip.style.borderStyle = "none "+(opts.BR?"solid":"none")+" none "+(opts.BL?"solid":"none");
			var b=document.createElement("div");
			b.style.margin = (pad.B-width)+"px -"+pad.R+"px -"+pad.B+"px -"+pad.L+"px";
			b.style.backgroundColor = "transparent";
			for ( var i=0; i < width; i++ ) {
				var w = fx=="round" ? Math.round(width*(1-Math.cos(Math.asin(i/width)))) : i+1;
				var e = strip.cloneNode(false);
				e.style.borderWidth = "0 "+(opts.BR?w:0)+"px 0 "+(opts.BL?w:0)+"px";
				b.appendChild(e);
			}
			this.appendChild(b);
		}
	});
};



<!--eigener schmarrn-------------------------->
function newimg(num,det,cal){vnum = num; var b=0; vdet = b; var pfad = textpfad+
vnum+'_'+det+'.php';contchange(pfad);}




function showmask(){$.expose.load();}



function contchange(url){alert("bin in contchange" + url);xmlhttp=null;
if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else if (window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
if (xmlhttp!=null){xmlhttp.onreadystatechange=state_Change;xmlhttp.open("GET",url,true); xmlhttp.send(null);}else{
alert("Ihr Browser ist für den vorgesehenen Datenempfang nicht geeignet.");}}
function state_Change(){if (xmlhttp.readyState==4){if (xmlhttp.status==200){var txt =xmlhttp.responseText;document.getElementById("txt1").innerHTML = txt ;}
else{alert("Problem mit dem Datentransport oder mit dem Datenempfang");}}}
