// *** Main Functions ***

function ShowHideDiv(DivID,Property) {
 if (document.getElementById) {
  document.getElementById(DivID).style.display = Property;
 }
}

function PrintPage() {
 if (window.print) {
  window.print(); 
 }
 else {
  alert('Ihr Browser unterstützt diese Funktion nicht. Bitte benutzen sie die Druckfunktion ihres Browsers.'); 
 }
}

function ClearInp(oFormElement) {
 oFormElement.value="";
}

function FillInp(oFormElement,sText) {
 if (oFormElement.value == "") {
  oFormElement.value=sText;
 }
}

// *** Products Layer Switch ***

function SetFooterPosition() {
 if (document.getElementById) {
  document.getElementById('Footer').style.position = 'relative';
  document.getElementById('Footer').style.bottom = '-1px';
 } 
}

function SwitchContent(DivID,DivNr,NrofDivs) {
 if (document.getElementById) {
  var Property;  
  for (i = 1; i <= NrofDivs; i++) { 
   if (i == DivNr && document.getElementById(DivID+i).style.display == 'none') {
    Property = 'block';
	SetFooterPosition();
   }
   else {
    Property = 'none';
   }
   document.getElementById(DivID+i).style.display = Property;
  }
 }
}


// *** Swap CamImg *** 

function ChangeCamImg() {
 if (document.getElementById) {
  if (document.images['CamImg'].src == "http://www.xlink.at/images/xcam_wals.jpg") {
		document.images['CamImg'].src = "http://www.xlink.at/images/xcam_fuschl.jpg";
  } 
  else if (document.images['CamImg'].src == "http://www.xlink.at/images/xcam_fuschl.jpg") {
		document.images['CamImg'].src = "http://www.xlink.at/images/xcam_gaisberg.jpg";
  } 
  else if (document.images['CamImg'].src == "http://www.xlink.at/images/xcam_gaisberg.jpg") {
		document.images['CamImg'].src = "http://www.xlink.at/images/xcam_uberg1.jpg";
  } 
  else if (document.images['CamImg'].src == "http://www.xlink.at/images/xcam_uberg1.jpg") {
		document.images['CamImg'].src = "http://www.xlink.at/images/xcam_predigtstuhl.jpg";
  } 
  else {
		document.images['CamImg'].src = "http://www.xlink.at/images/xcam_wals.jpg";
  }
 }  
 if (i >= 49) {
  window.clearInterval(Int);
 }
 i++;
}
