function pbrLoadEnglish(id) {
	winPbrEn = window.open("/pbrEnglisch.php?id="+id,"","height=400,width=650,scrollbars=no,dependent=no,menubar=no,resizable=no,toolbar=no,location=no");

}

function zoom (imgId) {
	var img;

	img = document.getElementById('imgMain').src;
	var imgA =img.split('/');
	imgId = imgA.length-1;
	img = imgA[imgId];
	document.getElementById('imgMainZoom').innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="490" height="400" id="imageViewer" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="/imageViewer.swf?imageName='+img+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/imageViewer.swf?imageName='+img+'" quality="high" bgcolor="#ffffff" width="490" height="400" name="imageViewer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	document.getElementById('imgMainZoom').style.display = 'inline';
	document.getElementById('imgMain').style.display = 'none';
}

function createVoucher (id) {
	winVoucher = window.open("/garten-shop/voucher.php?vId="+id,"","height=580,width=520,scrollbars=no,dependent=no,menubar=no,resizable=no,toolbar=no,location=no");
}

function clematisLiefertermine() {
	winClem = window.open("/hinweisClematis.html","","height=400,width=450,scrollbars=no,dependent=no,menubar=no,resizable=no,toolbar=no,location=no");
}

function vImg(ts) {
document.getElementById('imgMain').style.display='inline';
document.getElementById('imgMainZoom').style.display='none';
var b;
b=document.getElementById('imgMain').src;
b=b.split("/");
var lb=b.length;
b=b[lb-1];
var s;
s=document.getElementById(ts).src;
s=s.split("/");
var ls=s.length;
s=s[ls-1];
document.getElementById('imgMain').src="/elements/rosen/490/"+s;
document.getElementById(ts).src="/elements/rosen/150/"+b;
return true;
}

function tip (nr,lang)
	{
	if (lang=='de')
		{
			switch (nr)
				{
				case 1: info="Firma Schmid-Gartenpflanzen"; break;
				case 2: info="Sortenlisten"; break;
				case 3: info="Infos zur Pflege"; break;
				case 4: info="So bestellen Sie"; break;
				case 5: info="G�stebuch und Forum"; break;
				case 6: info="Rosige Links"; break;
				case 7: info="Bilder unserer Rosen"; break;
				}
		}
		else if (lang=='en')
				{
					switch (nr)
						{
						case 1: info="The Company Schmid-Gartenpflanzen"; break;
						case 2: info="List of Varieties"; break;
						case 3: info="Information about Roses"; break;
						case 4: info="How to order online"; break;
						case 5: info="Guestbook and Forum"; break;
						case 6: info="More about Roses at the www"; break;
						case 7: info="Our most beautiful Pictures"; break;
						}
				}
		else if (lang=='fr')
				{
					switch (nr)
						{
						case 1: info="The Company Schmid-Gartenpflanzen"; break;
						case 2: info="List of Varieties"; break;
						case 3: info="Information about Roses"; break;
						case 4: info="How to order online"; break;
						case 5: info="Guestbook and Forum"; break;
						case 6: info="More about Roses at the www"; break;
						case 7: info="Our most beautiful Pictures"; break;
						}
				}

	document.getElementById("minfo").childNodes[0].nodeValue=info;
	document.getElementById("nav_info").className="navinfo_"+nr;
	}

function re_tip ()
	{
	document.getElementById("minfo").childNodes[0].nodeValue="Benutzen Sie die Sechsecke zur Navigation";
	document.getElementById("nav_info").className="nav_info";
	}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
var preloaded;
preloaded = MM_preloadImages('/elements/gfx/nL.jpg','/elements/gfx/n32.jpg','/elements/gfx/n36.jpg','/elements/gfx/nTR.jpg','/elements/gfx/nT.gif','/elements/gfx/nT1.jpg','/elements/gfx/nT6.jpg','/elements/gfx/lBrdT.jpg','/elements/gfx/rBrdT.jpg');
preloaded = MM_preloadImages('/elements/gfx/n1.jpg','/elements/gfx/bgLiTR.gif','/elements/gfx/bgHR.gif','/elements/gfx/bgHRT.gif','/elements/gfx/navTopRosen_f2.gif','/elements/gfx/navTopGarten_f2.gif','/elements/gfx/navTopForum_f2.gif','/elements/gfx/navTopLinks_f2.gif','/elements/gfx/navTopSitemap_f2.gif','/elements/gfx/navTopNewsletter_f2.gif','/elements/gfx/navTopVersand_f2.gif','/elements/gfx/navTopBasket_f2.gif','/elementsTest/gfx/nL.jpg','/elements/gfx/bsk_txt.gif','/elements/gfx/bestellen.gif','/elements/gfx/lupe.gif','/elements/gfx/forum.gif','/elements/gfx/forum_txt.gif','/elements/gfx/kommentar.gif','/elements/gfx/rosenkommentare_txt.gif','/elements/gfx/extra.gif','/elements/gfx/extra_txt.gif','/elements/gfx/partner.gif','/elements/gfx/partner_txt.gif','/elements/gfx/bgHRT.gif');
//alert ("preloaded");

function komment (id)
{
window.open("/mail_komment.php?kommID="+id,"antwort","height=450,width=400");
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}return true;
}

function xajax_liveSearch() {
	xajax.call("liveSearch",arguments,1);
	}
function getActiveWord() {
	a=document.getElementById('lsActive');
	if (active) {
		ret = a.firstChild.innerHTML;
	}
	else ret = '';

	return (ret);
}

function lsAddEvents () {
	document.getElementById("searchWords").setAttribute("autocomplete","off");
	if (navigator.userAgent.indexOf("Safari") > 0) {
		document.getElementById('searchWords').addEventListener("keydown",searchKeyPress,false);
		document.getElementById("searchWords").addEventListener("blur",searchBlur,false);
	} else if (navigator.product == "Gecko") {
		document.getElementById('searchWords').addEventListener("keypress",searchKeyPress,false);
		document.getElementById("searchWords").addEventListener("blur",searchBlur,false);
	} else {
		document.getElementById("searchWords").attachEvent("onkeydown",searchKeyPress);
		document.getElementById("searchWords").attachEvent("onblur",searchBlur);
		isIE = true;
	}
}
function submitSearch (words) {
	document.getElementById('searchWords').value = words;
	document.getElementById('searchForm').submit ();
}
function searchBlur () {
	document.getElementById("liveSearch").style.display="none";
}
function searchKeyPress (event) {
	active = document.getElementById("lsActive");
	switch (event.keyCode) {
		case 40:
			if (!active)
				active = document.getElementById("liveSearch").firstChild.firstChild;
			else {
				active.removeAttribute("id");
				active = active.nextSibling;
			}
			if (active) active.setAttribute("id","lsActive");
			if (!isIE) { event.preventDefault(); }
		break;
		case 38:
			if (!active)
				active=document.getElementById("searchList").firstChild.firstChild.lastChild;
			else {
				active.removeAttribute("id");
				active = active.previousSibling;
			}
			if (active) {active.setAttribute("id","lsActive");}
			if (!isIe) event.preventDefault();
		break;
		case 27: alert ("esc");
		break;
		case 13:
			word = document.getElementById("lsActive").firstChild.innerHTML;
			document.getElementById("searchWords").value = word;
		break;
	         case 8:
			words = document.getElementById("searchWords").value;
			words = words.substring(0,words.length-1);
			xajax_liveSearch(words);
	        break;
		default:
			if (event.which)
				n=event.which;
			else n=event.keyCode;
			n = n+0;
			ltr = String.fromCharCode(n);
			words = document.getElementById("searchWords").value+ltr;
			xajax_liveSearch(words);
		break;
	}
}

var xajaxRequestUri="http://test.schmid-gartenpflanzen.de/liveSearch.php";

function Xajax(){this.workId='xajaxWork'+new Date().getTime();this.depth=0;this.getRequestObject=function(){var req;try{req=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{req=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e2){req=null;}
}
if(!req&&typeof XMLHttpRequest!="undefined")
req=new XMLHttpRequest();return req;}
this.$=function(sId){return document.getElementById(sId);}
this.getFormValues=function(frm){var objForm;if(typeof(frm)=="string")
objForm=this.$(frm);else
objForm=frm;var sXml="<xjxquery><q>";if(objForm&&objForm.tagName=='FORM'){var formElements=objForm.elements;for(var i=0;i < formElements.length;i++){if((formElements[i].type=='radio'||formElements[i].type=='checkbox')&&formElements[i].checked==false)
continue;var name=formElements[i].name;if(name){if(sXml!='<xjxquery><q>')
sXml+='&';sXml+=name+"="+encodeURIComponent(formElements[i].value);}
}
}
sXml+="</q></xjxquery>";return sXml;}
this.objectToXML=function(obj){var sXml="<xjxobj>";for(i in obj){try{if(i=='constructor')
continue;if(obj[i]&&typeof(obj[i])=='function')
continue;var key=i;var value=obj[i];if(value&&typeof(value)=="object"&&
(value.constructor==Array
)&&this.depth <=50){this.depth++;value=this.objectToXML(value);this.depth--;}
sXml+="<e><k>"+key+"</k><v>"+value+"</v></e>";}
catch(e){}
}
sXml+="</xjxobj>";return sXml;}
this.call=function(sFunction,aArgs,sRequestType){var i,r,postData;if(document.body)
document.body.style.cursor='wait';var xajaxRequestType=sRequestType;var uri=xajaxRequestUri;var value;switch(xajaxRequestType){case 0:{var uriGet=uri.indexOf("?")==-1?"?xajax="+encodeURIComponent(sFunction):"&xajax="+encodeURIComponent(sFunction);for(i=0;i<aArgs.length;i++){value=aArgs[i];if(typeof(value)=="object")
value=this.objectToXML(value);uriGet+="&xajaxargs[]="+encodeURIComponent(value);}
uriGet+="&xajaxr="+new Date().getTime();uri+=uriGet;postData=null;}break;case 1:{postData="xajax="+encodeURIComponent(sFunction);postData+="&xajaxr="+new Date().getTime();for(i=0;i <aArgs.length;i++){value=aArgs[i];if(typeof(value)=="object")
value=this.objectToXML(value);postData=postData+"&xajaxargs[]="+encodeURIComponent(value);}
}break;default:
alert("Illegal request type: "+xajaxRequestType);return false;break;}
r=this.getRequestObject();r.open(xajaxRequestType==0?"GET":"POST",uri,true);if(xajaxRequestType==1){try{r.setRequestHeader("Method","POST "+uri+" HTTP/1.1");r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}
catch(e){alert("Your browser does not appear to  support asynchronous requests using POST.");return false;}
}
r.onreadystatechange=function(){if(r.readyState!=4)
return;if(r.status==200){var data=r.responseXML;if(data)
xajax.processResponse(data);}
}
r.send(postData);delete r;return true;}
this.willChange=function(element,attribute,newData){var oldData;if(attribute=="innerHTML"){tmpXajax=this.$(this.workId);if(tmpXajax==null){tmpXajax=document.createElement("div");tmpXajax.setAttribute('id',this.workId);tmpXajax.style.display="none";tmpXajax.style.visibility="hidden";document.body.appendChild(tmpXajax);}
tmpXajax.innerHTML=newData;newData=tmpXajax.innerHTML;}
eval("oldData=document.getElementById('"+element+"')."+attribute);if(newData!=oldData)
return true;return false;}
this.processResponse=function(xml){var tmpXajax=null;xml=xml.documentElement;for(i=0;i<xml.childNodes.length;i++){if(xml.childNodes[i].nodeName=="alert"){if(xml.childNodes[i].firstChild)
alert(xml.childNodes[i].firstChild.nodeValue);}
if(xml.childNodes[i].nodeName=="jscript"){if(xml.childNodes[i].firstChild)
eval(xml.childNodes[i].firstChild.nodeValue);}
if(xml.childNodes[i].nodeName=="update"){var action;var element;var attribute;var search;var data;var type;var objElement;for(j=0;j<xml.childNodes[i].attributes.length;j++){if(xml.childNodes[i].attributes[j].name=="action"){action=xml.childNodes[i].attributes[j].value;}
}
var node=xml.childNodes[i];for(j=0;j<node.childNodes.length;j++){if(node.childNodes[j].nodeName=="target"){for(k=0;k<node.childNodes[j].attributes.length;k++){if(node.childNodes[j].attributes[k].name=="attribute"){attribute=node.childNodes[j].attributes[k].value;}
}
element=node.childNodes[j].firstChild.nodeValue;}
if(node.childNodes[j].nodeName=="search"){if(node.childNodes[j].firstChild)
search=node.childNodes[j].firstChild.nodeValue;else
search="";}
if(node.childNodes[j].nodeName=="data"){if(node.childNodes[j].firstChild)
data=node.childNodes[j].firstChild.nodeValue;else
data="";}
if(node.childNodes[j].nodeName=="type"){if(node.childNodes[j].firstChild)
type=node.childNodes[j].firstChild.nodeValue;else
type="";}
}
if(action=="assign"){if(this.willChange(element,attribute,data)){eval("document.getElementById('"+element+"')."+attribute+"=data;");}
}
if(action=="append")
eval("document.getElementById('"+element+"')."+attribute+"+=data;");if(action=="prepend")
eval("document.getElementById('"+element+"')."+attribute+"=data+document.getElementById('"+element+"')."+attribute);if(action=="replace"){eval("var v=document.getElementById('"+element+"')."+attribute);var v2=v.indexOf(search)==-1?v:"";while(v.indexOf(search)>-1){x=v.indexOf(search)+search.length+1;v2+=v.substr(0,x).replace(search,data);v=v.substr(x,v.length-x);}
if(this.willChange(element,attribute,v2))
eval('document.getElementById("'+element+'").'+attribute+'=v2;');}
if(action=="clear")
eval("document.getElementById('"+element+"')."+attribute+"='';");if(action=="remove"){objElement=this.$(element);if(objElement.parentNode&&objElement.parentNode.removeChild){objElement.parentNode.removeChild(objElement);}
}
if(action=="create"){var objParent=this.$(element);objElement=document.createElement(attribute);objElement.setAttribute('id',data);if(type&&type!='')
objElement.setAttribute('type',type);objParent.appendChild(objElement);if(objParent.tagName=="FORM"){}
}
}
}
document.body.style.cursor='default';}
}
var xajax=new Xajax();function xajax_liveSearch(){xajax.call("liveSearch",arguments,1);}
