function popfunc(URL, breite, hoehe, name)

{



	if (!breite){var breite=770;}

	if (!hoehe)	{var hoehe=550;}

	if (!name)	{var name='popname';}

	

	var top=(screen.availHeight-hoehe)/2;

	var left=(screen.availWidth-breite)/2;

   

    popwin=window.open(URL,name,"height="+hoehe+", width="+breite+",menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left="+left+",top="+top+"");

    popwin.resizeTo(breite,hoehe);

	popwin.focus();

}



function popscroll(URL, breite, hoehe)



{



	if (!breite){var breite=362;}

	if (!hoehe)  {var hoehe=360;}

	

	var top=(screen.availHeight-hoehe)/2;

	var left=(screen.availWidth-breite)/2;

	var args = "height="+hoehe+", width="+breite+",menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left="+left+",top="+top;

	popscrollwin=window.open(URL,'popscrollname',args);

	popscrollwin.focus();



}







function getImgByName(name){

	for(var i=0; i<document.images.length; i++){

		if (document.images[i].name==name){

			return eval(document.images[i]);

		}

	}

}



function resizeForImg(){

	var img = getImgByName("bild");

	var breite = img.width+20;

	var hoehe = img.height+60;

	window.resizeTo(breite, hoehe);

	window.moveTo((screen.width-breite)/2, (screen.height-hoehe)/2);

	self.focus();

}



function flip(name, mode){ 

	//aufruf: onMouseOver="flip('name')" onMouseOut="flip('name')"

	//wenn gew�nscht kann in mode direkt noch "over" oder "out" angegeben werden

	var img=getImgByName(name);

	var src_str=img.src;

	//Sucht, ob in src des files der String "_over.gif" vorkommt...

	if (src_str.match(/_over\.gif$/)){

		var ausdruck = /^(.*)_over\.gif$/;

		ausdruck.exec(src_str);

		//...und ersetzt ihn wenn ja durch ".gif"

		if (mode!='over'){

			img.src = RegExp.$1 + ".gif";

		}

	} else {

		//wenn nicht wird ".gif"...

		var ausdruck = /^(.*)\.gif$/;

		ausdruck.exec(src_str);

		//...durch "_over.gif" ersetzt

		if (mode!='out'){                                                                 

			img.src = RegExp.$1 + "_over.gif";

		}

	}

}

function flip_menu(img){



	//aufruf: onMouseOver="flip(eval(this))" onMouseOut="flip(eval(this))"



	var src_str=img.src;



	//Sucht, ob in src des files der String "_over.gif" vorkommt...



	if (src_str.match(/_over\.gif$/)){



		var ausdruck = /^(.*)_over\.gif$/;



		ausdruck.exec(src_str);



		//...und ersetzt ihn wenn ja durch ".gif"



		img.src = RegExp.$1 + ".gif";



		



	} else {



		//wenn nicht wird ".gif"...



		var ausdruck = /^(.*)\.gif$/;



		ausdruck.exec(src_str);



		//...durch "_over.gif" ersetzt



		img.src = RegExp.$1 + "_over.gif";



	}



}





























