var selected;
var submitter = null;

function submitFunction() {
    submitter = 1;
}
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=572,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')
}

//function BilderVorladen() {
//  document.Vorladen = new Array();
//  if(document.images) {
//    for(var i = 0; i < BilderVorladen.arguments.length; i++) {
//      document.Vorladen[i] = new Image();
//      document.Vorladen[i].src = BilderVorladen.arguments[i];
//    }
//  }
//}

function BilderVorladen(img) {
  document.Vorladen = new Array();
  if(document.images) {
    for(var i = 0; i < img.length; i++) {
      document.Vorladen[i] = new Image();
      document.Vorladen[i].src = img[i];
    }
  }
}

function setLanguage(lang){
    var url = window.location.href;
    url = url + "?language=" + lang;
    window.location = url;
}


function showImg(id, src, sx1_exists)
{
    var el = document.getElementById(id + "SWF");
    if(el) el.style.display = "None";
    el = document.getElementById(id + "Video");
    if(el) el.style.display = "None";
    el = document.getElementById(id + "Image");
    if(el) el.style.display = "";

	var img = document.getElementById(id);
	if (img) img.src=src;
    if (img) document.location.hash=id; // by sascha
	return false;
}

function productsSWF(id)
{
    var el = document.getElementById(id + "Image");
    if(el) el.style.display = "None";
    el = document.getElementById(id + "Video");
    if(el) el.style.display = "None";
    var el = document.getElementById(id + "SWF");
    if(el) el.style.display = "";
}

function productsVideo(id)
{
    var el = document.getElementById(id + "Image");
    if(el) el.style.display = "None";
    var el = document.getElementById(id + "SWF");
    if(el) el.style.display = "None";
    var el = document.getElementById(id + "Video");
    if(el) el.style.display = "";
}


if (preloadImg){
	window.onload=function(){
		BilderVorladen(preloadImg);
	};
}

