function showImage(url) {
	$("#image_preview").attr("src",url);
}

 
function showImage2(url) {
	//$("#image_preview").empty();
	doc='<img src="'+url+'" align="left"/>';
	$("#image_preview").html(doc);
}

function showSitemap() {
	showSitemapPopup();
	return false;
}
function showSitemapPopup(pnr) {
	windowOpener('sitemap.shtml','Sitemap','width=500,height=600')
}

function showImgPrev(nr,t,id) {
	showImagesPreview(nr,t,id);
	return false;
}

function showImagesPreview(pnr,type,pid) {
	windowOpener('popup.html?showImg='+pnr+'&imgType='+type+"&vcId="+pid,'preview','width=496,height=430');
}
function navImgPrev() {
	nr=parseInt(document.forms[0].nr.value);
	if(nr<=0) return false;
	nr-=1;
	if(imgsp[nr][1]=="img") str=getImg(imgsp[nr][0]);
	else str=getSWF(imgsp[nr][0]);
	document.getElementById("showImageContainer").innerHTML=str;
	if(nr == 0) { document.getElementById("goPrev").className="img_prev inactiv"; }
	else{ document.getElementById("goPrev").className="img_prev"; }
	if(nr+1 >= imgsp.length) { document.getElementById("goNext").className="img_next inactiv"; }
	else { document.getElementById("goNext").className="img_next"; }
	document.forms[0].nr.value=nr;
	document.getElementById("imgCounter").innerHTML=(nr+1)+"/"+imgsp.length;
	return false;
}
function navImgNext() {
	nr=parseInt(document.forms[0].nr.value);
	if(nr>=imgsp.length-1) return false;
	nr+=1;
	if(imgsp[nr][1]=="img") str=getImg(imgsp[nr][0]);
	else str=getSWF(imgsp[nr][0]);
	document.getElementById("showImageContainer").innerHTML=str;
	if(nr == 0) { document.getElementById("goPrev").className="img_prev inactiv"; }
	else{ document.getElementById("goPrev").className="img_prev"; }
	if(nr+1 >= imgsp.length) { document.getElementById("goNext").className="img_next inactiv"; }
	else { document.getElementById("goNext").className="img_next"; }
	document.forms[0].nr.value=nr;
	document.getElementById("imgCounter").innerHTML=(nr+1)+"/"+imgsp.length;
	return false;
}

function getImg(url) {
	s='<img src="'+url+'" alt="Produkt Image" width="454" height="302"/>';
	return s;
}
function getSWF(url) {
	var s="";
	s+='<object height="304" width="456" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">';
	s+='<param value="'+url+'" name="src"/>';
	s+='<embed height="304" width="456" src="'+url+'" type="application/x-shockwave-flash"/>';
	s+='</object>';
	return s;
}



function showVideo(url) {
	videoWindow = window.open('', "VideoPreview", "width=600,height=650,left=100,top=200,resizable=no");
	videoWindow.document.open();
	videoWindow.document.writeln('<html><head><title>Video Preview</title></head><body>');
	videoWindow.document.writeln('<object height="600" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">');
	videoWindow.document.writeln('<param value="'+url+'" name="src"/>');
	videoWindow.document.writeln('<embed height="600" width="600" src="'+url+'" type="application/x-shockwave-flash"/>');
	videoWindow.document.writeln('</object>');
	videoWindow.document.writeln('<div style="text-align:center"><a href="javascript:self.close();">Close window</a></div>');
	videoWindow.document.writeln('</body></html>');
	videoWindow.document.close();
	videoWindow.focus();
}

function showVideo2(url) {
	//$("#image_preview").empty();
	doc="";
	doc+='<object height="147" width="222" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">';
	doc+='<param value="'+url+'" name="src"/>';
	doc+='<embed height="147" width="222" src="'+url+'" type="application/x-shockwave-flash"/>';
	doc+='</object>';
	$("#image_preview").html(doc);
}

function infoOut(str) { $("input[name='search']").val(str); }
function infoOut2(str) { $("#logInfo").text(str); }
function clearLogInfo() { $("#logInfo").html("&nbsp;"); }

function bottomNavi() {
	document.write('<div style="border:1px solid black; padding:5px; margin-top:20px; position:absolute; bottom:5px;">');
	document.write('|&nbsp;&nbsp;');
	document.write('<a href="index_kurz.html">index_kurz</a>');
	document.write('&nbsp;&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="index.html">index</a>');
	document.write('&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="index2.html">index2</a>');
	document.write('&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="index3.html">index3</a>');
	document.write('&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="index31.html">index31</a>');
	document.write('&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="contact.html">contact</a>');
	document.write('&nbsp;|&nbsp;&nbsp;');
	document.write('<a href="newsletter.html">newsletter</a>');
	document.write('&nbsp;|');
	document.write('</div>');
}

function go(url) {
	switch(url) {
		case '1':
			document.location.href="index2.html";
			break;
		case '2':
			document.location.href="index3.html";
			break;
		default:
			document.location.href="index.html";
			break;
	}
}


