filesource=self.location.href.substring(self.location.protocol.length+2+self.location.host.length, self.location.href.length);

function parseHTTPGet(querystring, sep, assign) {
  if (querystring == '') return;
  var wertestring = querystring.slice(1);
  var paare = wertestring.split(sep);
  var paar, name, wert;
  for (var i = 0; i < paare.length; i++) {
    paar = paare[i].split(assign);
    name = paar[0];
    wert = paar[1];
    name = unescape(name).replace("+", " ");
    wert = unescape(wert).replace("+", " ");
    this[name] = wert;
  }
}

function appendHTTPGet(url) {
  return url+location.search;
}

function appendHTTPGetAll() {
 for (var i = 0; i < document.links.length; i++) {
   if (document.links[i].href.substring(0,4) != 'http' && document.links[i].href.substring(0,6) != 'mailto' && document.links[i].href.substring(0,10) != 'javascript') {
     document.links[i].search=location.search;
   }
 }
}

// usage: alert(getParam('ref')) alerts ft on http://server/file.htm?ref=ft
function getParam(name) {
  var httpGetParam = new parseHTTPGet(location.search, "&", "=");
  if (typeof httpGetParam[name] != "undefined") {
    return httpGetParam[name];
  }
  return "";
}

function setReference(form) {
  form.reference.value=location.search.substring(1);  // allgemeiner statt getParam('ref');
}

function DetailFenster(bild, parameter, land, sprache) {
  DetFenster=window.open("", "DetFenster", parameter);
  if ( bild.search(/(\.htm|\.html)$/) < 0 )
    DetFenster.location.href="/jsos/st-"+land+"/"+sprache+"_bilddetail.html?"+bild;
  else
    DetFenster.location.href=bild;
  DetFenster.focus();
}

function oeffneEmpfehlungFenster(land, sprache) {
  EmpfehlungFenster=window.open("/jsos/st-"+land+"/"+sprache+"_empfehlung.html", "EmpfehlungFenster", "width=600,height=650");
  EmpfehlungFenster.referer=location.href;
  EmpfehlungFenster.focus();
}

function pruefeauswahl(artnr) {
  if (artnr=="") {
    alert("Bitte wählen Sie die gewünschte Variante dieses Artikels!");
    return false;
  } else
    return true;
};

function lieferText(lieferJahr, lieferMonat, lieferTag, lieferText, sofortText) {
var curTime=new Date();
var curJahr=curTime.getYear();
if (curJahr < 1000) curJahr+=2000;
if (lieferJahr > 0 && lieferTag > 0 && lieferMonat > 0 && curJahr>=lieferJahr && curTime.getMonth()+1>=lieferMonat && curTime.getDate()>=lieferTag)
  document.writeln(sofortText);
else
  document.writeln(lieferText);
}


function insertImage()
{
document.write("<img width=1 height=1 border=0 src=http://www.sport-tiedje.com/psos/image.pl?screenx="+screen.width+"&screeny="+screen.height+"&res="+screen.colorDepth+"&ref="+document.referrer+"&pid="+window.location.search+"&self="+document.URL+"&cookie="+navigator.cookieEnabled+">");
}

function setmoddate() {document.writeln('16.03.10');}

function setmoddate() {document.writeln('16.03.10');}
