 window.defaultStatus="Filstal-Branchen - eine Initiative von Konzept-Internet, Ihrem regionalen Internetdienstleister im oberen Filstal!";
 var extern = null;
/*
if(this.location.href.indexOf('?')){
	window.document.getElementById('contentframe').location.href="../php/branchen.php"+this.location.href.substr(this.location.href.lastIndexOf('?')+1);
}
if (!parent.name || parent.name != "maincontent"){

    alert("Den Branchenindex 'Filstal-Branchen' erreichen Sie im Portal\n'Filstal-Alb'! Sie werden nun dorthin geleitet...");
	self.location.href = "../../index.html"
}else{
		top.top_page.maincontent.sponsor.location.replace("../themensponsor.php?thema="+this.location.pathname);
}
*/
function checkInput(){
    checkstr = window.document.forms[0].elements[0].value.toLowerCase();
    //window.document.forms[0].elements[1].focus();
    //window.document.forms[0].elements[0].value='';
    if (checkstr.length > 1){
        if (checkstr.indexOf('.de')>=0 || checkstr.indexOf('.com')>=0 || checkstr.indexOf('.net')>=0 || checkstr.indexOf('.info')>=0 || checkstr.indexOf('.biz')>=0 || checkstr.indexOf('.uk')>=0 || checkstr.indexOf('.it')>=0 || checkstr.indexOf('.fr')>=0 || checkstr.indexOf('.at')>=0 || checkstr.indexOf('.ch')>=0 || checkstr.indexOf('.se')>=0 || checkstr.indexOf('.sm')>=0 || checkstr.indexOf('.rs')>=0 || checkstr.indexOf('.pl')>=0 || checkstr.indexOf('.nl')>=0 || checkstr.indexOf('.dk')>=0 || checkstr.indexOf('.sl')>=0 || checkstr.indexOf('.org')>=0){
            if (checkstr.substr(0,7) != "http://"){
                if (checkstr.substr(0,4) == "www."){
                        checkstr='http:/'+'/'+checkstr;
                }else{
                   checkstr='http:/'+'/www.'+checkstr;
                }
            }
            open_window("extern",checkstr);
//            window.document.forms[0].submit() === false;
            return false;
        }else{
            if(window.document.forms[0].elements[0].value.length >= 2){
                //window.document.forms[1].elements[3].value=window.document.forms[0].elements[0].value;
				suchElement = 1;                
/*                if(window.document.forms[0].elements[1].ckecked()){
					suchElement = 1;
                }else if(window.document.forms[0].elements[2].ckecked()){
					suchElement = 2;
                }*/
                contentframe.location.href='../php/Branchen.php?keyword='+window.document.forms[0].elements[0].value+'&suchmethode='+window.document.forms[0].elements[suchElement].value;
//                window.document.forms[0].submit();
//                window.document.forms[0].action = "../php/Branchen.php";
//                window.document.forms[0].target="contentframe";
//				window.document.forms[0].submit();
            }
        }
    }
}
function recommend(){
var titlecol = this.document.getElementById('titlecol');
var seite = titlecol.innerText;
schlecht = "&";
seite = seite.replace(schlecht, "und");
var lastPos = seite.indexOf('Seite');
var seitenTitel = seite.substr(0,lastPos);
var target = '../empfehlen/empfehlung.php?page='+seitenTitel;
   fwidth = 440;
   fheight = 420;
   recommendwin = window.open(target, 'empfehlen', 'left=20 ,top=20 ,width='+fwidth+',height='+fheight+',scrollbars=no, resizable=no, status=no');
recommendwin.focus();
}
function open_window(name, url){
leftpos = 50;
toppos = 50;
if(name!="")
{
   if (name=="newsletter"){
         fwidth = 440;
   fheight = 420;
   url="newsletter/newsletter.php";
   newsletterwin = window.open(url, name, 'left=20 ,top=20 ,width='+fwidth+',height='+fheight+',scrollbars=no, resizable=no, status=no');
newsletterwin.focus();
   }
   if (name=="ratesite"){
         fwidth = 440;
   fheight = 420;
   url="../php/rating/rating.php?newrate="+userrights+"&userip="+userip+"&rateurl="+top.top_page.maincontent.content.location.href;
   ratewin = window.open(url, name, 'left=20 ,top=20 ,width='+fwidth+',height='+fheight+',scrollbars=no, resizable=no, status=no');
ratewin.focus();
   }
   if (name=="comment"){
         fwidth = 440;
   fheight = 420;
   url="../php/comment/comment.php" + url+"&newcomment"+userrights+"&userip="+userip+"&rateurl="+top.top_page.maincontent.content.location.href;
   ratewin = window.open(url, name, 'left=20 ,top=20 ,width='+fwidth+',height='+fheight+',scrollbars=no, resizable=no, status=no');
ratewin.focus();
   }
   if (name=="linktipp"){
         fwidth = 440;
   fheight = 455;
   url="http://www.filstal-alb.de/neue%20Version/php/linktipp.php";
   linkwin = window.open(url, name, 'left=20 ,top=20 ,width='+fwidth+',height='+fheight+',scrollbars=no, resizable=no, status=no');
linkwin.focus();
   }
   if (name!="wetter" && name!="chat" && name!="forum" && name!="metasuche" && name!="swp" && name !="newsletter" && name != "ratesite" && name != "linktipp" && name != "comment" || name == "extern")
   {
		fwidth = (screen.availWidth-127);
		fheight = (screen.availHeight-180);  
		fcommand = "resizable=yes,";   
		if(url.indexOf("microsite")>-1){
			fwidth = 680;
			fheight = 520;
			fcommand = "resizable=no,";
		}
		website = window.open(url, 'extern','left='+leftpos+',top='+toppos+',width='+fwidth+',height='+fheight+',scrollbars=yes,'+fcommand+'status=yes,toolbar=no,location=no');
		if(url.indexOf("microsite")>-1){
			website.document.title="Sie sehen eine Filstal-Branchen MicroSite";
		}
		website.focus();
  }
}
}
function resize(){
	if(screen.availWidth > 1025 || screen.availHeight > 769){
	   Width = 1024;
	   Height = 768;
	   }else{
	   Width = screen.availWidth;
	   Height = screen.availHeight;
	}
	window.resizeTo(Width,Height);
}
function show(id){
	showWin = window.open(id + ".html","showWin","top=100, left=400, width=250, height=365, scrollbars=no, status=no, resizable=no");
	showWin.focus();
}
