var pfad = 'http://www.sonwik.de/';





function popupWC_old () {
 fenster = window.open('/fileadmin/webCam.html', '', 'width=552,height=720,status=0,scrollbars=0,resizable=0');
 fenster.focus();
} 

function popupPdf_old(pdfFile) {
 fenster1 = window.open('/pdfdl/pdfdownload.php?file='+pdfFile, '', 'width=550,height=560,status=0,scrollbars=1,resizable=0');

 fenster1.focus();
} 

function backup_popupPdf(pdfFile) {
 fenster1 = window.open('/pdfdl/pdfdownload.php?file='+pdfFile, '', 'width=550,height=560,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function popupKontakt_alt(id) {
 fenster = window.open('/index.php?id='+id, '', 'width=510,height=570,status=0,scrollbars=1,resizable=0');
 fenster.focus();
} 

function popupKontaktDk(id) {
 fenster = window.open('/index.php?L=2&id='+id, '', 'width=510,height=570,status=0,scrollbars=1,resizable=0');
 fenster.focus();
} 

function backup_popupFlashPaper() {
 fenster1 = window.open('/fileadmin/foerdeblick_nr1/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper1() {
 fenster1 = window.open('/fileadmin/foerdeblick/2008-12_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper2() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-02_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 


function backup_popupFlashPaper3() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-04_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 


function backup_popupFlashPaper4() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-06_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 


function backup_popupFlashPaper5() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-07_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 


function backup_popupFlashPaper6() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-10_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper7() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-08_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper10() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-10_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper12() {
 fenster1 = window.open('/fileadmin/foerdeblick/2009-12_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 

function backup_popupFlashPaper201003() {
 fenster1 = window.open('/fileadmin/foerdeblick/2010-03_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 


function backup_popupFlashPaper201007() {
 fenster1 = window.open('/fileadmin/foerdeblick/2010-07_foerdeBlick/index.html', '', 'width=880,height=650,status=0,scrollbars=0,resizable=0');
 fenster1.focus();
} 



function kontaktSwitcher(bereich) {
	if (bereich == 'sonst') {
		document.getElementById('kontaktText').style.visibility = 'visible';
		document.getElementById('kontaktText').style.display = 'inline';
		
		$('kontaktHaus1').style.visibility = 'hidden';
		$('kontaktHaus1').style.display = 'none';
		$('kontaktHaus2').style.visibility = 'hidden';
		$('kontaktHaus2').style.display = 'none';
		$('kontaktHaus3').style.visibility = 'hidden';
		$('kontaktHaus3').style.display = 'none';
	} else {
		$('kontaktText').style.visibility = 'hidden';
		$('kontaktText').style.display = 'none';
		
		$('kontaktHaus1').style.visibility = 'visible';
		$('kontaktHaus1').style.display = 'block';
		$('kontaktHaus2').style.visibility = 'visible';
		$('kontaktHaus2').style.display = 'block';
		$('kontaktHaus3').style.visibility = 'visible';
		$('kontaktHaus3').style.display = 'block';
	}
	
	if(bereich == 'sonst') {
		$('hiddenFilds').innerHTML = '<input type="hidden" name="leeLuv" value="0" /><input type="hidden" name="haus3" value="0" /><input type="hidden" name="sonst" value="1" />'; }
	else if (bereich == 'haus3') {
		$('hiddenFilds').innerHTML = '<input type="hidden" name="haus3Dl" value="1" /> <input type="hidden" name="leeLuv" value="0" /><input type="hidden" name="haus3" value="1" /><input type="hidden" name="sonst" value="0" /><input type="hidden" name="pid" value="87" />';
	}
	else if (bereich == 'leeLuv') {
		$('hiddenFilds').innerHTML = '<input type="hidden" name="leeLuvDl" value="1" /> <input type="hidden" name="leeLuv" value="1" /><input type="hidden" name="haus3" value="0" /><input type="hidden" name="sonst" value="0" /><input type="hidden" name="pid" value="67" />';
		
	}
	else if (bereich == 'leeLuvHaus3') {
		$('hiddenFilds').innerHTML = '<input type="hidden" name="leeLuvDl" value="1" /><input type="hidden" name="haus3Dl" value="1" /> <input type="hidden" name="leeLuv" value="1" /><input type="hidden" name="haus3" value="0" /><input type="hidden" name="sonst" value="0" /><input type="hidden" name="pid" value="67" />';
		
	}
	
}

function kontaktSwitcher1(bereich) {
	if (bereich == 'textBox') {
		$('kontaktText').style.visibility = 'visible';
		$('kontaktText').style.display = 'inline';
		
		$('kontaktHaus1').style.visibility = 'hidden';
		$('kontaktHaus1').style.display = 'none';
		$('kontaktHaus2').style.visibility = 'hidden';
		$('kontaktHaus2').style.display = 'none';
		$('kontaktHaus3').style.visibility = 'hidden';
		$('kontaktHaus3').style.display = 'none';
	} else {
		$('kontaktText').style.visibility = 'hidden';
		$('kontaktText').style.display = 'none';
		
		$('kontaktHaus1').style.visibility = 'visible';
		$('kontaktHaus1').style.display = 'block';
		$('kontaktHaus2').style.visibility = 'visible';
		$('kontaktHaus2').style.display = 'block';
		$('kontaktHaus3').style.visibility = 'visible';
		$('kontaktHaus3').style.display = 'block';
	}
	
}



function azaz(){
	for (var linkNum = 0; linkNum < document.links.length; linkNum++)
	{
		var findTxt = 'detail.htm?';
		var replTxt = 'http://www.boatshop24.de/web/de/haendler_homepages/sonwik/detail.htm?';
		var link = document.links[linkNum];
		
		/*document.links[linkNum].target = '_blank';
		
		if( document.links[linkNum].text == '1' || document.links[linkNum].text == '2' || document.links[linkNum].text == '3' || document.links[linkNum].text == '4' || document.links[linkNum].text == '5' || document.links[linkNum].text == '6' || document.links[linkNum].text == 'Suchergebnis Ausdrucken' )
		{
			document.links[linkNum].target = '_self';
		}*/
		
		/*if(document.links[linkNum].href == "http://www.boatshop24.de/web/de/haendler_homepages/sonwik/liste.htm?printmode=1&pagina=0&nomenu=&BOATTYPE_ID=M")
		{			
                       document.links[linkNum].style.display = "none";
		}*/
	        
                // LOKALE Links in Externe Links umwandeln fr Importierte Seite
		link.href = link.href.replace(findTxt, replTxt);
	
                // Nur bei Hanse Links target="_blank" hinzufgen 
		if(link.href.substring(0,25) == 'http://www.boatshop24.com')
		{
			link.href = link.href.substring(0,link.href.length - 1) + "0";
			link.target = "_blank";
		}
		
		if(link.href.substring(0,66) == 'http://local.hoch2.org/web/de/haendler_homepages/sonwik/liste.htm?')
		{
			 var findURL = link.href.substring(0,66);
			 var replaceURL = 'http://www.sonwik.de/index.php?id=28&'
			 
			 link.href = link.href.replace(findURL, replaceURL);
		}
		
		if(link.href.substr(link.href.length-11,11) == 'printmode=1')
		{
			var findPrintMode = link.href.substr(link.href.length-11,11);
			var replacePrintMode = 'printmode=0';
			link.href = link.href.replace(findPrintMode,replacePrintMode)
		}
	

		//document.getElementByClass("pagebottomlink")[linkNum].style.display = "none";
	
	}
	
        // Hintergrundfarben entfernen fr unteren bereich 
	/*
	for(i=0;i<document.getElementsByTagName("td").length;i++)
	{
		//if(document.getElementsByTagName("td")[i].style.backgroundColor == "#02669A")
		//if(true)
		document.getElementsByTagName("td")[i].style.backgroundColor = "#123456";
		document.getElementsByTagName("td")[i].style.background = "none";
		
		if(document.getElementsByTagName("td")[i].style.backgroundColor == "#123456")
		{
			document.getElementsByTagName("td")[i].style.display = "none";
		}
	}
	
	*/
	
	// berschrift entfernen
	/*for(i=0;i<2;i++)
	{
		if(document.getElementsByTagName("b")[i].innerHTML == "Unser aktueller Bootsbestand")
		document.getElementsByTagName("b")[i].innerHTML  = "";
        document.getElementsByTagName("b")[i].style.display = "none";
	}*/
	
	//kopf ab
	for( i = 1 ; i < 4 ; i++ ) 
	{
		document.getElementsByTagName("table")[i].innerHTML = "";
		document.getElementsByTagName("table")[i].style.display = "none";
	}
	
	var lastTable = document.getElementsByTagName("table");
	
	document.getElementsByTagName("table")[4].style.display = "none";
	document.getElementsByTagName("table")[lastTable.length-1].style.padding = "0px";
	
	document.getElementsByTagName("form")[1].innerHTML="";
	document.getElementsByTagName("form")[1].style.display = "none";
	
        // Source von Bildern ndern
	for (var linkNum = 0; linkNum < document.images.length; linkNum++)
	{
		var findTxt = 'http://local.hoch2.org/images/bootsbilder/';
		var replTxt = 'http://www.boatshop24.com/images/bootsbilder/';
		
		var image = document.images[linkNum];
		
        // Bilder ausblenden!
		if(image.src ==  "http://www.sonwik.de/images/li_vspace_right.gif" ||
			image.src == "http://local.hoch2.org/images/li_rr.gif" ||
			image.src == "http://local.hoch2.org/images/li_vspace_right.gif" ||
			image.src == "http://local.hoch2.org/images/li_r.gif" ||
			image.src == "http://local.hoch2.org/images/li_vspace_left.gif" ||
			image.src == "http://local.hoch2.org/images/li_ff.gif" ||
			image.src == "http://local.hoch2.org/images/li_f.gif" ||
			image.src == "http://local.hoch2.org/images/li_neuesuche.gif" ||
			image.src == "http://local.hoch2.org/images/li_space1.gif" ||
			image.src == "http://local.hoch2.org/images/li_r_small.gif" ||
			image.src == "http://www.sonwik.de//images/li_space1.gif" ||
			image.src == "http://local.hoch2.org/images/li_f_small.gif" ||
			image.src == "http://www.sonwik.de/images/li_r_small.gif" ||
			image.src == "http://local.hoch2.org/images/haendlerprintline.gif" ||
			image.src == "http://local.hoch2.org/images/line550.gif" ||
		    image.src == "http://local.hoch2.org/images/haendlerlogos/sonwik.gif" ||
			image.src == "http://www.sonwik.de/images/li_druckansicht.gif" ||
			image.src == "http://www.sonwik.de/images/li_vspace_left.gif" ||
                        image.src == "http://www.sonwik.de/images/li_space1.gif" ||
                        image.src == "http://www.sonwik.de/images/line550.gif" ||
                        image.src == "http://www.sonwik.de/images/pt.gif"
                        ) {
				
			    document.images[linkNum].style.display = "none";
			    
				
		 }
		
		image.src = image.src.replace(findTxt, replTxt);
	
	
	}
}

function verstecke() {
	var allElems = document.getElementsByTagName('*');
	for (var i = 0; i < allElems.length; i++) {
		var thisElem = allElems[i];
		if (thisElem.className && thisElem.className == 'pagebottomlink') {
			thisElem.style.display = 'none';
		}
		
		if(thisElem.width == '560')
		{
			//thisElem.style.display = 'none';
			thisElem.width = '100%'
		}
		
		if(thisElem.width == '360')
		{
			//thisElem.style.display = 'none';
			thisElem.width = '240'
		}
		
		if(thisElem.width == '110')
		{
			//thisElem.style.display = 'none';
			thisElem.width = '90'
		}
		
		if (thisElem.width != '100%' && thisElem.id != 'container' && thisElem.id != 'bodyTag' && thisElem.className != 'linie' && thisElem.className != 'headerwrap3')
		{
			thisElem.style.background = 'none';
		}
	
	}
}



