function ajax_open_url(aTitle, aWidth, aHeight, aUrl){

	var zWidth = screen.width - 300;
	var zHeight = screen.height - 350;

	var win = new Window(
		{
			className: "alphacube", title: aTitle,
			width:zWidth, height:zHeight,
			url: aUrl
		}
		)
	win.show();
}

function wopen(link,wi,he) {

	var width=wi; var height=he;

	var sw = screen.availWidth;
	var sh = screen.availHeight;
	var dx = sw / 2 - wi / 2;
	var dy = sh / 2 - he / 2;

  wincom=window.open(link ,"oswin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width="+wi+",height="+he+",left="+dx+",top="+dy);

    if (wincom) {
    	wincom.focus() ;
	}
}

function fielddel(f) {

	if (f.value == f.defaultValue) {

		f.value = "" ;
	}
}

function fieldset(f) {

	if (f.value == "") {

		f.value = f.defaultValue ;
	}
}


function fieldemp(f) {

	if (f.sbeg.value == f.sbeg.defaultValue) {

		f.sbeg.value = "" ;
	}
}

function doJump (myUrl, myTarget) {
	if (myUrl != "" || myUrl != "#"){
		var tTarget = myTarget ? myTarget : '_self';
  	window.open(myUrl,tTarget);
  }
}

function changeView(imgSrc, mode) {

//	var myDir = (mode == 1) ? "plugin1/" : "";

	if (document.getElementById("detailPicture")){
//		document.getElementById("detailPicture").src="/nolte.internet/shop/images/artikel/detail/"+myDir+imgSrc;
		document.getElementById("detailPicture").src = imgSrc;
	}
}

function doChangePrice(){
	for(i=0;i<document.all.dd.length;++i){
	  if(document.all.dd.options[i].selected == true){
	  	var auswahl = document.all.dd.options[i].value;
	  	if (auswahl != "XXXYYY"){

	  		// Deklarationen
		  	var daten   = auswahl.split(",");
		  	var vPreis  = daten[1].replace(/\./, ",");

		  	// Varianten Preis ändern
		  	if (document.getElementById("detailPreis") && daten[1] > 0){
		  		document.getElementById("detailPreis").innerHTML = vPreis;
		  	}
		  }
	  }
	}
}

function submitVersandForm(){
	document.all.checkGuscheinCode.value = "ok";
	document.versand.submit();
	// alert(document.all.submitGutschein.value);
	// return true;
}

function toggleRow(rowId) {
	var theRow = document.getElementById(rowId);
	if (theRow.style.display == 'none') {
		theRow.style.display = 'inline';
		document.all.Use_Liefer.checked = true;
	} else {
		theRow.style.display = 'none';
		document.all.Use_Liefer.checked = false;
	}
	return true;
}



