/* Scriptdatei für die Website www.01art.de - 01art - Webdesign aus Köln */

var agt=navigator.userAgent.toLowerCase(); 

function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&document.getElementById)x=document.getElementById(n);return x;}

function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}obj.visibility=v;}}

function MM_controlShockwave(objStr,x,cmdName,frameNum){var obj=MM_findObj(objStr);
if (agt.indexOf("gecko/") >0) {MM_showHideLayers('Layer1','','show')}
if(obj)eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

function is_nice_when_people_know_how_to_use_it(){MM_showHideLayers('Layer1','','show')}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function auf(seite)

{var para = "resizable=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,toolbar=0,width=330,height=485"
Fenster = window.open('Portfolio/'+seite+'.htm','Portfolio',para);
Fenster.focus();
}

function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function LoadMenus() {
  if (window.fw_menu_0) return;

window.fw_menu_0 = new Menu("root",105,15,"Verdana,Arial, Helvetica, sans-serif",10,"#660000","#B7B6B6","#FFE600","#424242");
  fw_menu_0.addMenuItem("&Uuml;ber 01art","window.open('01art.htm', '_self');");
  fw_menu_0.addMenuItem("Leistungen","window.open('leistungen.shtml', '_self');");
  fw_menu_0.addMenuItem("Presseinformation","window.open('webdesign-koeln.htm', '_self');");
  fw_menu_0.addMenuItem("Adresse","window.open('Adresse.shtml', '_self');");
  fw_menu_0.addMenuItem("Portfolio","window.open('portfolio.htm', '_self');");
  fw_menu_0.addMenuItem("Home","window.open('index.htm', '_self');");
  fw_menu_0.addMenuItem("E-Mail","window.open('email.htm', '_self');");
 
  fw_menu_0.hideOnMouseOut=true;

  fw_menu_0.writeMenus();
} 

function Auswahl_kontrollieren(feld, index) {

if (index == 2 ) { 
if (feld[2].checked == true) {
for (index = 0; index < 2; index++)
feld[index].checked = false;
   }
}

if (index == 2 ) { 
if (feld[2].checked == true) {
feld[1].checked = false;
feld[0].checked = false;
   }
}
}

var Leerstring = " ist leer. Bitte füllen Sie dieses Feld aus."

function ueberpruefeForm(form) {
	return 	(pruefeString(document.forms[0].name, "name") &&
                 pruefeString(document.forms[0].email, "eMail") &&
				 pruefeString(document.forms[0].Thema, "Thema"))}

function KontrolleNull(eingabe) {
	if ( eingabe.length == 0 ) {
   	return false
	}
	else {
 	return NurSpace(eingabe)
	}
}

function NurSpace(eingabe) {
	for ( var i=0; i<eingabe.length; i++ ) {
   	if ( eingabe.charAt(i) != " " ) {
	   	return true
		}
	}
	return false
}

function zaehleZeichen(eingabe, anz) {
	if ( eingabe.length == anz ) {
		return true
	}
	else {
		return false  
	}
}


function ZahlinBereich(eingabe, unten, oben) {
	var zahl = parseInt(eingabe);
	return ((zahl >= unten) && (zahl <= oben))
}


function pruefeString(eingabe, str) {
	if ( KontrolleNull(eingabe.value) && NurSpace(eingabe.value)) {
		return true
	}	
	else {
		eingabe.focus()
		alert("Das Feld " + str + Leerstring)
		return false
	}
}


if (document.layers && agt.indexOf("win")!= -1)  {
    document.tags.a.textDecoration = "underline"; 
    document.tags.a.fontsize = "11px";
    document.tags.p.fontsize = "13px";
    document.tags.p.lineheight = "13px";
    }

if (document.layers && agt.indexOf("mac")!=-1){
    document.tags.a.textDecoration = "underline"; 
    document.tags.a.fontsize = "10px";
    document.tags.p.fontsize = "12px";
    document.tags.p.lineheight = "12px";
}
