function submit_to_wishlist() {
document.cart_quantity.submit_target.value = "wishlist";
document.cart_quantity.submit();
}
var selected;
var submitter = null;

function submitFunction() {
    submitter = 1;
}
function popup(url) {fenster=window.open(url,"Popupfenster","top=50, left=250, height=500, width=500, toolbar=0, scrollbars=yes, resizable=yes, dependent=yes, menubar=no, status=no, location=no");fenster.focus();return false;}
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function selectRowEffect(object, buttonSelect) {
  if (!selected) {
    if (document.getElementById) {
      selected = document.getElementById('defaultSelected');
    } else {
      selected = document.all['defaultSelected'];
    }
  }

  if (selected) selected.className = 'moduleRow';
  object.className = 'moduleRowSelected';
  selected = object;

// one button is not an array
  if (document.getElementById('payment'[0])) {
    document.getElementById('payment'[buttonSelect]).checked=true;
  } else {
    //document.getElementById('payment'[selected]).checked=true;
  }
}

function rowOverEffect(object) {
  if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}

function popupImageWindow(url) {
  window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

//Javascript für O-WS Ajax-Suche
function searchForAjax(suchbegriff){
	var AjaxSearchEnabled = true;
	if(suchbegriff.length >= 3 && AjaxSearchEnabled == true){
		document.getElementById("ajax_search_ergebnis").innerHTML = "<table width='100%' border='0' margin='0' padding='0' cellspacing='0'><tr><td id='ajax_serch_header' align='left'><table width='100%' border='0' margin='0' padding='0' cellspacing='0'><tr><td id='ajax_serch_header' align='left' valign='middle'>Suche l&auml;uft</td><td id='ajax_serch_header' align='left' valign='middle'><img src='images/ows-ajax-loader.gif' width='51' height='19'></td></tr></table></td></tr></table>";
		//Div-Objekt mit den Ergebnissen sichtbar machen
		document.getElementById("ajax_search_ergebnis").style.visibility = "visible";
		var xmlHttp = null;
		// Mozilla, Opera, Safari sowie Internet Explorer 7
		if (typeof XMLHttpRequest != 'undefined') {
			xmlHttp = new XMLHttpRequest();
		}
		if (!xmlHttp) {
			// Internet Explorer 6 und älter
			try {
				xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
			try {
				xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
			xmlHttp  = null;
			}
		}
	}
		// Wenn das Objekt erfolgreich erzeugt wurde, Abfrage starten
		if (xmlHttp) {
			var url = "advanced_search_result_ajax.php";
			var params = "keywords="+suchbegriff;
			xmlHttp.open("POST", url, true);
			//Headerinformationen für den POST Request
			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlHttp.setRequestHeader("Content-length", params.length);
			xmlHttp.setRequestHeader("Connection", "close");
			xmlHttp.onreadystatechange = function () {
			if (xmlHttp.readyState == 4) {
				// Zurückgeliefertes Ergebnis wird in den DIV "ergebnis" geschrieben
				document.getElementById("ajax_search_ergebnis").innerHTML = xmlHttp.responseText;
			}
		};
		xmlHttp.send(params);
		}
	} else {
		//Div-Objekt mit den Ergebnissen sichtbar machen
		document.getElementById("ajax_search_ergebnis").style.visibility = "hidden";
	}
}
function searchForAjaxClose(){
	document.getElementById("ajax_search_ergebnis").style.visibility = "hidden";
}
//Javascript für O-WS Ajax-Suche endet
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

