/* http://www.sltuk.com/ */



var bName = navigator.appName;
var bVer  = parseInt(navigator.appVersion);
var NS4   = ((bName == "Netscape") && (bVer >= 4));
var IE4   = ((bName == "Microsoft Internet Explorer") && (bVer >= 4));

  
  
  /* Rechtsklickschutz */
  
  function cu(){
  	return false
  }

  document.oncontextmenu = cu;


  
/* Bulletin News */

function news() {


  if(IE4) {

	document.write('<td class="rollnews" align="right" width="550">\n');
	document.write('<marquee scrollamount=2 scrolldelay=0>&nbsp;&nbsp;Softland Technology UK (SLTUK) offers expertise in SAP R/3 Basis, Web Design and Oracle Consultancy.</marquee>\n');
	document.write('</td>\n');
  }
  
  else  {
   
	document.write('<td class="rollnews" align="right" width="250">');
	document.write('&nbsp;');
	document.write('</td>\n');
	
  }
  
  
}



/* Add to Favorites */

function addToFavorite(){
  var favTitle = "Softland Technology"
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4))
 {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}



/* Lauftext in Statusleiste */

var text = "Softland Technology UK (SLTUK) offers expertise in SAP R/3 Basis, Web Design and Oracle Consultancy.";
var anzeige = "";
var t = 0;
function textRoll(){
	t=t+1;
	anzeige = text.substring(0,t);
	window.status=anzeige;
	if (t == text.length) t=0;
	scrolltext();
}
function scrolltext(){

	setTimeout('textRoll()',100);
}


/* Funktionen */

function gotoPage(pageIndex){
  	apageList = new Array(
	'index.php', 
	'index.php?page=1', 
	'index.php?page=2', 
	'index.php?page=3', 
	'index.php?page=4', 
	'index.php?page=5', 
	'index.php?page=6', 
	'index.php?page=7', 
	'index.php?page=8', 
	'index.php?page=9', 
	'index.php?page=10', 
	'index.php?page=11', 
	'index.php?page=12', 
	'index.php?page=13', 
	'index.php?page=14', 
	'index.php?page=15', 
	'index.php?page=16', 
	'index.php?page=17'
	);
  	var wohin = (apageList[pageIndex]);
  	location.href = wohin;
  }
  
  
function openFile(fileName){
	var afile = fileName;
    	window.open((afile), 'file', 'toolbar=no,status=no,resizable=no,menubar=no,scrollbars=no');
}

function openZip(fileName){
	var afile = fileName;
    	window.open((afile), 'zipfile', 'toolbar=no,status=no,resizable=no,menubar=no,scrollbars=no');
}
  
function openPage(fileName){
    	var afile = fileName;
      	window.open((afile), 'page', 'toolbar=no,status=no,resizable=no,menubar=no,scrollbars=yes,width=650,height=350');
}

function openMyPopup(pageURL,pageName,pageFeatures){
      	window.open(pageURL,pageName,pageFeatures);
}
  

  /* Mouseovers Archiv*/
  
  function mOver(cell)
  {
     if (!cell.contains(event.fromElement))
     {
        cell.style.cursor = 'default';
        cell.bgColor = '#99CCFF';
     }
  }
  
  function mOut(cell)
  {
     if (!cell.contains(event.toElement))
     {
        cell.style.cursor = 'default';
        cell.bgColor = '#336699';
     }
  }
  
  function mClick(cell)
  {
     if(event.srcElement.tagName=='TD')
     {
        cell.children.tags('a')[0].click();
     }
} 
  

function IsEmpty(myField) {
  	var retVal = true;
  	var aField = eval('document.contact.' + myField + '.value');
  	if (aField.length != 0) {
  		for (var i = 0; (i < aField.length) ; i++) {
  			if (aField.charAt(i) != " ") retVal = false;
  		}
  	}
 	return retVal;
}


function verify(f) {
  	var retVal = true;
  	var aFocus = "";
  	var myAlert = "";
  	var pRequired = new String(document.contact.iqrequired.value);
  	if (pRequired.length > 0) {
  		var pRequiredName = new String(document.contact.iqrequiredname.value);
  		var aRequired = pRequired.split(",");
  		var aRequiredName = pRequiredName.split(",");
  		for (i = 0; i < aRequired.length; i++) {
  			if (IsEmpty(aRequired[i])) {
  				myAlert += "\nPlease enter " + aRequiredName[i];
  				retVal = false;
  				if (aFocus.length == 0) {
  					aFocus = aRequired[i];
  				}
  			}
  		}
  
  	}
  
  	if (!retVal) {
  		alert(myAlert);
  		if (aFocus.length != 0) {
  			eval("document.contact." + aFocus + ".focus()");
  		}
  	}
  	return retVal;
}
  
function letsSubmit() {
  	if (verify(document.contact)) {
  		document.contact.submit();
  	}
}
  
  
  
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}



























/* ----------------------------------------------------------------------------------------*/
 
  function popup() {
    	window.open('wwformularok.htm', 'contact', 'toolbar=no,status=no,resizable=no,menubar=no,scrollbars=no,width=300,height=200');
  }
  
 
 function menu_down(nr){
 
 
 	y = nr;
 	var iqthisspan = eval("menu" + (y) + ".style");
 	var iqBreite = iqthisspan.width;
 	var iqHoehe = iqthisspan.height;
 	
 	var iAnfang = 0;
 	var iEnde = iqHoehe.length - 2;
 	var nurhoehe = iqHoehe.substring(iAnfang,iEnde);
 	var iHoehe = nurhoehe - 0;
 
 	iqh = iHoehe;
 
 	var iAnfang2 = 0;
 	var iEnde2 = iqBreite.length - 2;
 	var nurbreite = iqBreite.substring(iAnfang2,iEnde2);
 	var iBreite = nurbreite - 0;
 	
 	iqb = iBreite;
 	
 	if(document.all){
 		if(aktuelleHoehe <= iqh) {
 			iqthisspan.visibility="visible";
 			iqthisspan.clip="rect(0 " + iqb + " "+ aktuelleHoehe + " 0)";
 			aktuelleHoehe = aktuelleHoehe + Geschwindigkeit;
 			window.setTimeout("menu_down(y)",10);
 		}
 		else 
 			aktuelleHoehe = iqh;
 	}
 	 		
 	else {
 	alert("geht");
 		lay[y].visibility = "visible";
 		lay[y].clip.height = iqh;
 		lay[y].clip.width = iqb;
 	}
 	
 }
 
 function menu_right(nr){
 
 
 	y = nr;
 	var iqthisspan = eval("menu" + (y) + ".style");
 	var iqBreite = iqthisspan.width;
 	var iqHoehe = iqthisspan.height;
 	
 	var iAnfang = 0;
 	var iEnde = iqHoehe.length - 2;
 	var nurhoehe = iqHoehe.substring(iAnfang,iEnde);
 	var iHoehe = nurhoehe - 0;
 
 	iqh = iHoehe;
 
 	var iAnfang2 = 0;
 	var iEnde2 = iqBreite.length - 2;
 	var nurbreite = iqBreite.substring(iAnfang2,iEnde2);
 	var iBreite = nurbreite - 0;
 	
 	iqb = iBreite;
 	
 	
 		if(aktuelleBreite <= iqb) {
 	
 	   		if(document.all){
 	   			iqthisspan.visibility="visible";
 				iqthisspan.clip="rect(0 " + aktuelleBreite + " "+ aktuelleHoehe + " 0)";
 	   		}
 	   		else if(navigator.appName=="Netscape") {
 	   			lay[y].visibility = "show";
 	   			lay[y].clip.height = aktuelleBreite;
 	   			lay[y].clip.width = iqh;
 	   		}
 	
 		aktuelleBreite = aktuelleBreite + Geschwindigkeit;
 		aktuelleHoehe = aktuelleHoehe + Geschwindigkeit;
 		window.setTimeout("menu_right(y)",10);
 	 	}
 	 	else {
 	 		aktuelleBreite = iqb;
 	 		aktuelleHoehe = iqh;
 	 	}
 	
}
 
 
 /* Untermenues ausblenden (wird nicht verwendet)*/
  	
  function menu_up(nr){
  
  y = nr;
  var rqthisspan = eval("menu" + (y) + ".style");
  var rqBreite = rqthisspan.width;
  var rqHoehe = rqthisspan.height;
  
  
  var iAnfang = 0;
  var iEnde = rqHoehe.length - 2;
  var nurhoehe = rqHoehe.substring(iAnfang,iEnde);
  var iHoehe = nurhoehe - 0;
  
  rqh = iHoehe;
  
  var iAnfang2 = 0;
  var iEnde2 = rqBreite.length - 2;
  var nurbreite = rqBreite.substring(iAnfang2,iEnde2);
  var iBreite = nurbreite - 0;
  
  rqb = iBreite;
  
  	if(aktuelleHoehe >= 0) {
  
     		if(document.all){
  			rqthisspan.visibility="visible";
  			rqthisspan.clip="rect(0 " + rqb + " "+ aktuelleHoehe + " 0)";
     		}
     		else if(document.layers)
     			rqthisspan.clip.height = aktuelleHoehe;
     			rqthisspan.clip.width = rqb;
  
  	aktuelleHoehe = aktuelleHoehe - Geschwindigkeit;
  	window.setTimeout("menu_up(y)",10);
   	}
  
  
  
  
}
