// JavaScript Document

function formprint(Wert) // print post
{
		document.form2.target = '_top';
		document.form2.FormSubmit_Flag.value = '-1';
		document.form2.print_view.value = '0';
  if( Wert == 'print'){
		document.form2.target = '_blank';
		document.form2.FormSubmit_Flag.value = '0';
		document.form2.print_view.value = '-1';
		document.form2.submit();
  }
}


function searchquery(Wert)
{
	Wert = escape(Wert);
	Link	= "search.php?query=" + Wert;
	window.open(Link, 'Suche','scrollbars=yes,resizable=yes,width=430,height=530');
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function pnow()
{	for(i=0;i<document.images.length;i++)
	{	if ( document.images[ i ].src == "http://img.map24.com/map24/portal/de-en/16_print.gif" )
			document.images[ i ].style.width=0;
	}
	window.print();
}

function validate_form() {
  validity = true; // assume valid
  if (!check_empty(document.agbform.agb.checked))
        { validity = false; alert('Sie müssen den AGB zustimmen um die Bestellung abzuschließen!'); }
  
  return validity;
}

function check_empty(status) {
  return (status == 1); // gibt false zurück wenn leer
}

function pngalpha() {
	if( navigator.appName == 'Microsoft Internet Explorer' && navigator.platform == 'Win32' ) {
		var picId = 0;
		var overlayimage = 'template/shim.gif';
		while( picId < document.images.length ) {
			//Bildtyp ermitteln
			var ext = document.images[picId].src;
			ext = ext.substring(ext.length-3,ext.length);
			ext = ext.toLowerCase();
			if( ext == 'png' ) {
				var src = document.images[picId].src;
				var height = document.images[picId].height;
				var width = document.images[picId].width;
				document.images[picId].src = overlayimage;
				document.images[picId].height = height;
				document.images[picId].width = width;
				document.images[picId].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
			}
			++picId;
		}
	}
}
window.onload = pngalpha;



