

function init() { 
if (!document.getElementById) return false; 
var f = document.getElementById('quick_find'); 
var u = f.elements[0]; 
f.setAttribute("autocomplete", "off"); 
} 

var req;
var submitter = null;
function submitFunction() {
   submitter = 1;
   }



function loadXMLDoc(key) {

   var url="quickfind.php?<?php echo tep_session_name() . '=' . tep_session_id(); ?>&keywords="+key;

   // Internet Explorer
   try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
   catch(e) {
      try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(oc) { req = null; }
   }

   // Mozailla/Safari
   if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }

   // Call the processChange() function when the page has loaded
   if (req != null) {
      req.onreadystatechange = processChange;
      req.open("GET", url, true);
      req.send(null);
   }
}

function processChange() {
   // The page has loaded and the HTTP status code is 200 OK
   if (req.readyState == 4 && req.status == 200) {

      // Write the contents of this URL to the searchResult layer
      getObject("quicksearch").innerHTML = req.responseText;
   }
}

function getObject(name) {
   var ns4 = (document.layers) ? true : false;
   var w3c = (document.getElementById) ? true : false;
   var ie4 = (document.all) ? true : false;

   if (ns4) return eval('document.' + name);
   if (w3c) return document.getElementById(name);
   if (ie4) return eval('document.all.' + name);
   return false;
}


window.onload = function() {
   /* getObject("keywords").focus(); */
}



function popupWindow(url) {
  window.open(url,'popupWindow','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')
}

function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


function checkboxRowEffect(object) {
  document.checkout_confirmation.elements[object].checked = !document.checkout_confirmation.elements[object].checked;
  if(document.checkout_confirmation.elements[object].checked) {
    document.checkout_confirmation.elements[object].parentNode.parentNode.className = 'moduleRowSelected';
  } else {
    document.checkout_confirmation.elements[object].parentNode.parentNode.className = 'moduleRowOver';
  }
}

function check_agree(TheForm) {
  if (TheForm.agree.checked) {
	document.getElementById('bconfirm').style.display = 'none';
	document.getElementById('bconfirmed').style.display = 'block';
    return true;
  } else {
    alert(unescape('Bitte bestätigen Sie unsere AGB'));
    return false;
  }
}

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}


function first() {
if(document.getElementById)
document.getElementById("first").style.display = "block";
document.getElementById("second").style.display = "none";
}

function second() {
if(document.getElementById)
document.getElementById("first").style.display = "none";
document.getElementById("second").style.display = "block";
}
