
var bName = navigator.appName;
var bVer  = parseInt(navigator.appVersion);

var NS4   = ((bName == "Netscape") && (bVer >= 4));
var IE4   = ((bName == "Microsoft Internet Explorer") && (bVer >= 4));
var OP	  = navigator.userAgent.indexOf("Opera");
  
  
/* Rechtsklickschutz */
  
function cu(){
  	return false
}

document.oncontextmenu = cu;

/* Add to Favorites */

function addToFavorite(){
  var favTitle = "SOWECO - Solutions Web Consulting"
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4))
 {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}

  
/* Lauftext in Statusleiste */

var text = "Fotodesign Märzinger       ";
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 showPic(bild_name) {
  	var Bild = new Image(); 
  	Bild.src = "imagespopup/" + bild_name;
    	if (IE4) {
    		var thisspan = window.document.getElementById("Bildbereich");    		
  		thisspan.innerHTML = "<img src=\"" + Bild.src + "\">";
	}
	else {
		setCont("index",0,null,"<img src=\"" + Bild.src + "\">");
	}
  }
  
var verticalpos="fromtop"

function JSFX_FloatTopDiv(){
        var startX = 680,
        startY = 279;
        var ns = (navigator.appName.indexOf("Netscape") != -1);
        var d = document;
        function ml(id) {
                var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
                if(d.layers)el.style=el;
                       el.sP=function(x,y){this.style.left=x;this.style.top=y;}
                el.x = startX;
                if (verticalpos=="fromtop"){
                        el.y = startY;
                }else{
                        el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
                        el.y -= startY;
                }
                return el;
        }
        window.stayTopLeft=function(){
                if (verticalpos=="fromtop"){
                        var pY = ns ? pageYOffset : document.body.scrollTop;
                        ftlObj.y += (pY + startY - ftlObj.y)/40;
                }else{
                        var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
                        ftlObj.y += (pY - startY - ftlObj.y)/40;
                }
                ftlObj.sP(ftlObj.x, ftlObj.y);
                setTimeout("stayTopLeft()", 10);
        }
        ftlObj = ml("divStayTopLeft");
        stayTopLeft();
}


function change(tausch_bild_name,neues_bild_name)
  {
  parent.showImage.document[tausch_bild_name].src = "images/pictures/"+neues_bild_name+".jpg";
  var testvar = window.document[tausch_bild_name].src
  alert(testvar);
  }
    
  function openFile(fileName){
  	var afile = fileName;
  	window.open((afile), 'archiv', 'toolbar=no,status=no,resizable=yes,menubar=no,scrollbars=no');
  }

    
  function openPage(pageName){
    	var wohin = pageName;
    	location.href = wohin;
  }
  
    
  function openMyPopup(pageURL,pageName,pageFeatures){
  	window.open(pageURL,pageName,pageFeatures);
  }
  
  function exit(){
  	var wohin = "about:blank";
  	top.location.href = wohin;
  }


/* Mouseovers */
  
function mOver(cell, movcolor) {
  if (!cell.contains(event.fromElement)) {
       cell.style.cursor = 'default';
       cell.bgColor = movcolor;
  }
}
  
function mOut(cell, moucolor) {
  if (!cell.contains(event.toElement)) {
       cell.style.cursor = 'default';
       cell.bgColor = moucolor;
  }
}
  
function mClick(cell) {
  if(event.srcElement.tagName=='TD') {
     cell.children.tags('a')[0].click();
  }
} 
  

/* Formularabfrage */

function isSelect(){
  
     if(document.category.radiobutton.checked != true)
      {
       alert("Bitte Kategorie auswählen!");
       return false;
      }
}      



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 = "Bitte geben Sie noch folgende Daten an:";
  	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 += "\n " + 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();

  	}
}
  

 
  
  
 
  
  
  
  
  
  
  
  

 
 
 