function info(dat) {
	var winopts='resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,width=540,height=500,top=20,left=200';
	remote=window.open(dat, "info", winopts);
	remote.focus();
}

function show_pic(dat, title) {
	var winopts='resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,width='+(screen.availWidth-200)+',height='+(screen.availHeight-200)+',top=20,left=20';
	picture=window.open("", "picture", winopts);
	picture.document.open();
	picture.document.writeln('<HTML><HEAD><TITLE>'+(title?title+' | ':'')+'Deatilansicht Bild</TITLE><BODY leftmargin="2" topmargin="2" onBlur="self.close()"><IMG src='+dat+'></BODY></HTML>');
	picture.document.close();
	picture.focus();
}

function check_sonst( alert_text ) {
	var identstring = navigator.userAgent;
	if (self.location.search.search(/shop=[a-z0-9]+/) > 0) {
		if (identstring.indexOf("Opera",0) != -1) {
			// Laden ohne WinBasket Opera
		} else if (identstring.indexOf("Firefox",0) != -1 && identstring.indexOf("Gecko/",0) != -1) {
			// Laden ohne WinBasket FireFox
		} else if (identstring.indexOf("MSIE 5.",0) != -1) {
			// Laden ohne WinBasket IE 5
		} else if (identstring.indexOf("MSIE 6.",0) != -1) {
			document.forms[0].target = 'basket_win';
			var winopts='resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,width=270,height=40,top='+((screen.availHeight-60)/2)+',left='+((screen.availWidth-270)/2);
			basket_win=window.open('', "basket_win", winopts);
		}
	}

	var fehler = 0;
	if (document.forms[0].Sons1) {
		if (document.forms[0].Sons1.selectedIndex == 0) {
			fehler += 1;
		}
	}
	if (document.forms[0].Sons2) {
		if (document.forms[0].Sons2.selectedIndex == 0) {
			fehler += 1;
		}
	}
	if (fehler >= 1) {
		if ( alert_text != '') {
			alert ( alert_text );
		} else {
			alert ('Sie haben noch nicht alle Optionen gewählt.\nBitte wählen Sie die Optionen aus.');
		}
		return false;
	} else {
		return true;
	}
}

// Aufrufe Bildgalerie
function changeimg (prefix, bildsrc) {
	document.getElementById("prod_img").src = prefix +"/artimg/TN3_"+ bildsrc;
}
function openbg (prefix, bildsrc, shopid, artnr) {
	if (bildsrc != "") {
		bildsrc = escape(bildsrc);
	}
	var winopts='resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,width='+(screen.availWidth-200)+',height='+(screen.availHeight-200)+',top=20,left=20';
	picture=window.open( prefix +"/cgi-bin/bildgalerie.cgi?shop_id="+shopid+"&artnr="+artnr+"&start="+bildsrc+"&prefix="+prefix, "picture", winopts);
	picture.focus();
}

// Aufrufe M.M. ImageSwap
function MM_findObj(n, d) { //v3.0
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
