// JavaScript Document
var imgwidth=1270;
var imgheight=750;
var imgratio=imgwidth/imgheight;
var bodywidth, bodyheight;
function resizebg() {
 var bodywidth = document.body.offsetWidth;
 var bodyheight = (document.body.offsetHeight);
 imgwidth=bodywidth;
 imgheight=imgwidth/imgratio;
 if(imgheight<bodyheight)
 {
  imgheight=bodyheight;
  imgwidth=imgheight*imgratio;
 }
 document.getElementById('bgimg').width=imgwidth;
 document.getElementById('bgimg').height=imgheight;
 document.getElementById('bg').style.width=bodywidth.toString()+'px';
 document.getElementById('bg').style.height=bodyheight.toString()+'px';
}
function getContentheight() {
 return (document.body.offsetHeight)-145;
}
function in_array(teil,arr) {
 for(p=0;p<arr.length;p++) if (teil == arr[p]) return true;
 return false;
}

var mausxpos;
var mausypos;

var sicon = new GIcon(G_DEFAULT_ICON);
sicon.image = "http://www.schneider-sportswear.de/images/map/sicon.png";
sicon.iconSize = new GSize(27, 35);
sicon.printImage = "http://www.schneider-sportswear.de/images/map/sicon.png";
sicon.shadow = "http://www.schneider-sportswear.de/images/map/sicon_shadow.png";
sicon.shadowSize = new GSize(35, 35);
sicon.infoWindowAnchor = new GPoint(5, 30);
sicon.iconAnchor = new GPoint(0, 35);

var icon = new GIcon(G_DEFAULT_ICON);
icon.image = "http://www.schneider-sportswear.de/images/map/icon.png";
icon.iconSize = new GSize(30, 29);
icon.printImage = "http://www.schneider-sportswear.de/images/map/icon.png";
icon.shadow = "http://www.schneider-sportswear.de/images/map/icon_shadow.png";
icon.shadowSize = new GSize(30, 29);
icon.infoWindowAnchor = new GPoint(5, 28);
icon.iconAnchor = new GPoint(8, 29);


function getAjax()
{
 var xmlhttp;
 /*@cc_on
 @if (@_jscript_version >= 5)
 try
 {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
 }
 catch(e)
 {
  try
  {
   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  catch (E)
  {
   xmlhttp=false;
  }
 }
 @else
 xmlhttp = false;
 @end @*/
 if (!xmlhttp && typeof XMLHttpRequest!='undefined')
 {
  try
  {
   xmlhttp=new XMLHttpRequest();
  }
  catch (e)
  {
   xmlhttp=false;
  }
 }
 return xmlhttp;
}

function ajaxget(url, vars) {
 req=getAjax();
 req.open('POST', url , false);
 req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
 req.send(vars);
 return req.responseText;
}

function loadcontent(url, vars, ebene) {
 var backvar=ajaxget(url, vars);
 eval('contentvars='+backvar);
 document.getElementById(ebene).innerHTML=contentvars['content'];
 if(contentvars['script']) eval(contentvars['script']);
 return false;
}

