﻿// JavaScript Document

var pref = '&#109;a' + 'i&#108;' + '&#116;o'; 
var attribut = 'hr' + 'ef' + '='; var first = 'office'; var at = '%40'; var last = 'unimedia.ag'; 
var first2 = 'office'; var at2 = '&#x40;'; var last2 = 'unimedia.ag'; 
var ma = '<a ' + attribut + '\'' + pref + ':' + first + at + last + '\'>' + (first2 + at2 + last2 ) +  '<\/a>'

function showpopupwindow(sUrl,w,h,cb,sb){
if (cb=='yes')
sProp='';
else {
if ((w==-1) || (h==-1)) {
sProp= 'width='+screen.width+',height='+screen.height+',top=0,left=0,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
} else {
l=(screen.width)?(screen.width-w)/2:100;
t=(screen.height)?(screen.height-h)/2:100;
sProp='width='+ w +',height='+ h +',top='+ t +',left='+ l +',scrollbars='+ sb +',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
}
}
oWin=window.open(sUrl,'',sProp);
oWin.focus();
}


function displayLoader() {    	
			if (document.getElementById('error')) {   document.getElementById('error').style.display='none';  }
			if (document.getElementById('records')) {   document.getElementById('records').style.display='none';  }
			if (document.getElementById('progress')) {   document.getElementById('progress').style.display='block';  }
}

function toggle(obj) {
	var el = document.getElementById(obj);
	el.style.display = (el.style.display != 'none' ? 'none' : '' );
}

function oc(a)
{
  var o = {};
  for(var i=0;i<a.length;i++)
  {
    o[a[i]]='';
  }
  return o;
}

function changeMenu(sel)
{
var f = sel.form;
var opt = sel.options[sel.selectedIndex].value;


if( opt in oc(['AUT','CHE','NLD','BEL','GBR']) )
{
document.getElementById("zahlungsart").optionslength = 0;
document.getElementById("zahlungsart").options[0] = new Option("Sofortueberweisung","sofortueberweisung");
document.getElementById("zahlungsart").options[4] = new Option("Paypal","paypal");
document.getElementById("zahlungsart").options[1] = new Option("Mastercard","mastercard");
document.getElementById("zahlungsart").options[2] = new Option("Visa","visa");
document.getElementById("zahlungsart").options[3] = new Option("American Express","amex");
}

else if( opt in oc(['DEU']) )
{
document.getElementById("zahlungsart").optionslength = 0;
document.getElementById("zahlungsart").options[0] = new Option("Sofortueberweisung","sofortueberweisung");
document.getElementById("zahlungsart").options[5] = new Option("Paypal","paypal");
document.getElementById("zahlungsart").options[4] = new Option("Lastschrift","elv");
document.getElementById("zahlungsart").options[1] = new Option("Mastercard","mastercard");
document.getElementById("zahlungsart").options[2] = new Option("Visa","visa");
document.getElementById("zahlungsart").options[3] = new Option("American Express","amex");

}

else
{
document.getElementById("zahlungsart").optionslength = 0;
document.getElementById("zahlungsart").options[0] = new Option("Mastercard","mastercard");
document.getElementById("zahlungsart").options[1] = new Option("Visa","visa");
document.getElementById("zahlungsart").options[2] = new Option("American Express","amex");
document.getElementById("zahlungsart").options[3] = new Option("Paypal","paypal");
}

return true;
}

