ieHover = function() {

 if (document.getElementById("selectlanguage"))
 {
 		document.getElementById("selectlanguage").onmouseover = function() {
 			UL=this.getElementsByTagName("UL");
 			UL[0].className="iehover";
 		}
 		document.getElementById("selectlanguage").onmouseout = function() {
 			UL=this.getElementsByTagName("UL");
 			UL[0].className="";
 		}


 	/*	if (LIs = document.getElementById("selectlanguage").getElementsByTagName("LI"))
 	{
 		for (var i=0; i<LIs.length; i++)
 		{
 			alert('elemente:'+LIs.length);
 			var liOldClass = '';
 			liOldClass = LIs[i].className;
 			alert('classe:'+liOldClass);

 			LIs[i].onmouseover = function() {
 				alert('mouseover');
 				this.className+=" iehover";
 			}
 			LIs[i].onmouseout = function() {
 				alert('mouseout:'+liOldClass);
 				this.className = liOldClass;
 			}
 		}
 	}*/
 }
}
if (window.attachEvent) window.attachEvent("onload", ieHover);

function activate(element,vorbelegung) {  //Diese Funktion benötigt zwei Angaben: Die erste (element) dient dazu, auf das entsprechende Formularfeld zuzugreifen. Hier ist im Formular immer this anzugeben (siehe Formular). Die zweite (vorbelegung) enthält den gleichen Text, der auch bei dem jeweiligen <input>-Feld unter value=\"\" bzw. bei <textarea> zwischen <textarea> und </textarea> angegeben ist.
  if (element.value == vorbelegung) {  //Hier wird überprüft, ob der derzeitige Inhalt der Vorbelegung entspricht.
    element.value = '';  //Ist das der Fall, dann wird der Inhalt gelöscht und
    //element.className = 'normal';  //wieder normal dargestellt (die Klasse des Feldes wird auf 'normal' geändert).
  }
}
function leave(element,vorbelegung) {  //Diese Funktion benötigt die gleichen Angaben wie activate().
  if (element.value == '') {  //Hier wird überprüft, ob das Feld bereits durch den User ausgefüllt wurde.
    element.value = vorbelegung;  //Wenn nicht, dann wird die Vorbelegung wiederhergestellt und
    //element.className = 'vorbelegung';  //der Text wieder grau und kursiv dargestellt (erneute Änderung der Klasse).
  }
}

function ChangeMainnavIcon(item,aktiv)
{
	 if (document.getElementById(item))
	 {
	   	document.getElementById(item).style.backgroundImage='url('+aktiv+')';
	   	document.getElementById(item).style.backgroundRepeat='repeat-y';
	 }
}
function RestoreMainnavIcon(item)
{
	 if (document.getElementById(item))
	  	document.getElementById(item).style.backgroundImage='';
}

function initAccordion(uHeader, uContent, expandindex, colorArrows, fileextention) {
	if(uHeader)
		headerclass = uHeader;
	if(uContent)
		contentclass = uContent;
	if(!colorArrows)
		colorArrows = 'lightgrey';
	
	if(!fileextention)
		fileextention = 'gif';
	
	ddaccordion.init({
		headerclass: headerclass, //Shared CSS class name of headers group
		contentclass: contentclass, //Shared CSS class name of contents group
		revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
		mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
		collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
		defaultexpanded: [expandindex], //index of content(s) open by default [index1, index2, etc] [] denotes no content
		onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
		animatedefault: true, //Should contents open by default be animated into view?
		persiststate: false, //persist state of opened contents within browser session?
		toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
		togglehtml: ["suffix", "<img src='"+MyDocumentRoot+"icons/arrow_right_"+colorArrows+"."+fileextention+"' class='statusicon' />", "<img src='"+MyDocumentRoot+"icons/arrow_down_"+colorArrows+"."+fileextention+"' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
		animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
		oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
			//do nothing
		},
		onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
			//do nothing
		}
	})
}

function subnavRefresh()
{
	gleich=new Date();
	var t2=gleich.getTime();
	if((t2-subnavEffectStart)>=subnavEffectDauer)
	{	x=subnavEffectX2;
		window.clearTimeout(subnavTimer);
		subnavEffectFinished();
	}
	else
	{	x=subnavEffectX1+(subnavEffectX2-subnavEffectX1)*(t2-subnavEffectStart)/subnavEffectDauer;
		subnavTimer = window.setTimeout("subnavRefresh()", 50);
	}
	subnavDiv.style.left=x+'px';
}

function subnavMove(subnavworld,left,subnavwidth)
{
	SetContentHeight();
	//alert("subnavMove from "+left+" to "+(-subnavwidth));
	subnavEffectX1=left;//Number(subnavworld.style.left.replace(/px/,''));
	subnavEffectX2=-subnavwidth;
	subnavEffectDauer=600;
	var jetzt = new Date();
	subnavEffectStart=jetzt.getTime();
	subnavDiv=subnavworld;
	subnavTimer = window.setTimeout("subnavRefresh()", 50);
}

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
  	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) < 7.0);
	if(itsAllGood)
	{

   for(var i=0; i<document.images.length; i++)
      {
     var img = document.images[i]
     var imgName = img.src.toUpperCase()
     if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
        {
       if (img.className=='galleryimagescroller' || (img.className=='galleryimagedetail' && img.width==0 && img.height==0 ))
        	continue;
       var imgID = (img.id) ? "id='" + img.id + "' " : ""
       if(img.className=='galleryimage') {
         multi = 100/img.height;
         img.height = 100;
         img.width = img.width * multi;
         //sizingMethod = 'scale';
       }
       //else
       //	 sizingMethod = 'image';
	   sizingMethod='scale';

       var imgClass = (img.className) ? "class='" + img.className + "' " : ""
       var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
       var imgStyle = "display:inline-block;" + img.style.cssText
       if (img.align == "left") imgStyle = "float:left;" + imgStyle
       if (img.align == "right") imgStyle = "float:right;" + imgStyle
       if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
       if (img.onmouseover) {
			var str = ""+img.onmouseover+"";
			str=str.replace(/[\r\n|\s]/g, '');
			var ausdruck = /^functionanonymous\(\)\{(.*)\}$/ig;
			ausdruck.exec(str);
			if (RegExp.$1) {
	      		imgOnMouseover = 'onmouseover="'+RegExp.$1+'" ';
	      	}
	      	else
	      		imgOnMouseover = '';
       }
       else imgOnMouseover = '';

	   var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgOnMouseover
       + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
        + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
       + "(src=\'" + img.src + "\', sizingMethod='"+sizingMethod+"');\"></span>"
       img.outerHTML = strNewHTML
       i = i-1
        }
      }
	}
}
if (window.attachEvent) window.attachEvent("onload", correctPNG);

// The background PNG fix
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
   window.attachEvent("onload", alphaBackgrounds);
}

function alphaBackgrounds(){
   var rslt = navigator.appVersion.match(/MSIE (d+.d+)/, '');
   var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
   if(document.all)
   {
   	for (i=0; i<document.all.length; i++){
      	var bg = document.all[i].currentStyle.backgroundImage;
      	if (itsAllGood && bg){
         	if (bg.match(/.png/i) != null){
            	var mypng = bg.substring(5,bg.length-2);
            	document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
            	document.all[i].style.backgroundImage = "url('')";
        	 }
    	  }
   	}
   }
}

alphaBackgrounds();

function subnavAufklappen()
{
	var d1 = document.getElementById('subnavzugeklappt');
	var d2 = document.getElementById('subnavaufgeklappt');
	var d3 = document.getElementById('subnavwiederzuklappen');
	d1.style.display='none';
	d2.style.display='block';
	if(d3)
		d3.style.display='block';
	SetContentHeight();
}
function subnavZuklappen()
{
	var d1 = document.getElementById('subnavzugeklappt');
	var d2 = document.getElementById('subnavaufgeklappt');
	var d3 = document.getElementById('subnavwiederzuklappen');
	d1.style.display='block';
	d2.style.display='none';
	if(d3)
		d3.style.display='none';
	SetContentHeight();
}
function CreateBookmarkLink(title,url)
{

	if (window.sidebar)
	{ // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	}
	else if( window.external )
		{ // IE Favorite
			window.external.AddFavorite( url, title);
		}
		else
			if(window.opera && window.print)
			{ // Opera Hotlist
				return true;
			}
}

function BrowserCheckBrowser()
{
var BrowserDetect = {
		init: function () {
			this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
			this.version = this.searchVersion(navigator.userAgent)
				|| this.searchVersion(navigator.appVersion)
				|| "an unknown version";
			this.OS = this.searchString(this.dataOS) || "an unknown OS";
		},
		searchString: function (data) {
			for (var i=0;i<data.length;i++)	{
				var dataString = data[i].string;
				var dataProp = data[i].prop;
				this.versionSearchString = data[i].versionSearch || data[i].identity;
				if (dataString) {
					if (dataString.indexOf(data[i].subString) != -1)
						return data[i].identity;
				}
				else if (dataProp)
					return data[i].identity;
			}
		},
		searchVersion: function (dataString) {
			var index = dataString.indexOf(this.versionSearchString);
			if (index == -1) return;
			return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
		},
		dataBrowser: [
			{
				string: navigator.userAgent,
				subString: "Chrome",
				identity: "Chrome"
			},
			{ 	string: navigator.userAgent,
				subString: "OmniWeb",
				versionSearch: "OmniWeb/",
				identity: "OmniWeb"
			},
			{
				string: navigator.vendor,
				subString: "Apple",
				identity: "Safari",
				versionSearch: "Version"
			},
			{
				prop: window.opera,
				identity: "Opera"
			},
			{
				string: navigator.vendor,
				subString: "iCab",
				identity: "iCab"
			},
			{
				string: navigator.vendor,
				subString: "KDE",
				identity: "Konqueror"
			},
			{
				string: navigator.userAgent,
				subString: "Firefox",
				identity: "Firefox"
			},
			{
				string: navigator.vendor,
				subString: "Camino",
				identity: "Camino"
			},
			{		// for newer Netscapes (6+)
				string: navigator.userAgent,
				subString: "Netscape",
				identity: "Netscape"
			},
			{
				string: navigator.userAgent,
				subString: "MSIE",
				identity: "Explorer",
				versionSearch: "MSIE"
			},
			{
				string: navigator.userAgent,
				subString: "Gecko",
				identity: "Mozilla",
				versionSearch: "rv"
			},
			{ 		// for older Netscapes (4-)
				string: navigator.userAgent,
				subString: "Mozilla",
				identity: "Netscape",
				versionSearch: "Mozilla"
			}
		],
		dataOS : [
			{
				string: navigator.platform,
				subString: "Win",
				identity: "Windows"
			},
			{
				string: navigator.platform,
				subString: "Mac",
				identity: "Mac"
			},
			{
				   string: navigator.userAgent,
				   subString: "iPhone",
				   identity: "iPhone/iPod"
		    },
			{
				string: navigator.platform,
				subString: "Linux",
				identity: "Linux"
			}
		]

	};
	BrowserDetect.init();

	MyBrowserDetectVersion=BrowserDetect.version;
	MyBrowserDetectBrowser=BrowserDetect.browser;

	//alert("Debug: "+BrowserDetect.browser+" V "+BrowserDetect.version);
	if (BrowserDetect.browser=='Explorer')
		if(BrowserDetect.version>=6)
			return 'ok';
	if (BrowserDetect.browser=='Firefox')
		if(BrowserDetect.version>=2)
			return 'ok';
	if (BrowserDetect.browser=='Safari')
		if(BrowserDetect.version>=4)
			return 'ok';
	if (BrowserDetect.browser=='Chrome')
		if(BrowserDetect.version>=3)
			return 'ok';
	return 'ko';
}

function BrowserCheckFlash()
{
	if(!(flashinstalled == 2))
		return 'ko';
	else if(MyRecommendedFlashVersion>flashversion)
		return 'old';
	else
		return 'ok';
}

function BrowserCheck(performcheck)
{
	var browsercheckdiv;
	var browserimg;
	var flashimg;
	var browserdiv;
	var flashdiv;
	var flashtr;
	var allok=true;
	var flashok;

	browsercheckdiv=document.getElementById('browsercheck');
	browserimg = document.getElementById('browsercheckbrowser');
	flashimg = document.getElementById('browsercheckflash');

	if(!browsercheckdiv) return;
	if(!browserimg) return;
	if(!flashimg) return;

	var browserok=BrowserCheckBrowser();
	var flashok=BrowserCheckFlash();

	browserdiv = document.getElementById('browsercheckbrowser'+browserok);
	if (browserok!='ok')
	{	browserimg.src=browserimg.src.replace(/ok.gif/,browserok+".gif");
		browserdiv.innerHTML=browserdiv.innerHTML.replace(/&lt;version&gt;/,MyBrowserDetectVersion);
		browserdiv.innerHTML=browserdiv.innerHTML.replace(/&lt;version>/,MyBrowserDetectVersion);	// Safari Bug
		browserdiv.innerHTML=browserdiv.innerHTML.replace(/&lt;browser&gt;/,MyBrowserDetectBrowser);
		browserdiv.innerHTML=browserdiv.innerHTML.replace(/&lt;browser>/,MyBrowserDetectBrowser);	// Safari Bug
		if(performcheck)
			allok=false;
	}

	flashdiv = document.getElementById('browsercheckflash'+flashok);
	if (flashok!='ok')
	{	flashimg.src=flashimg.src.replace(/ok.gif/,flashok+".gif");
		flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;flashversion&gt;/,flashversion);
		flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;flashversion>/,flashversion);	// Safari Bug

		if (MyRequiredFlashVersion>flashversion)
		{	allok=false;
			flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;requiredversion&gt;/,MyRequiredFlashVersion);
			flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;requiredversion>/,MyRequiredFlashVersion);	// Safari Bug
		}
		else
		{	flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;requiredversion&gt;/,MyRecommendedFlashVersion);
			flashdiv.innerHTML=flashdiv.innerHTML.replace(/&lt;requiredversion>/,MyRecommendedFlashVersion);	// Safari Bug
		}
		if((flashok=='ko') && performcheck)
			allok=false;
	}

	if(!allok)
	{
		browserdiv.style.display="block";
		flashdiv.style.display="block";
		browsercheckdiv.style.display="block";
	}
}

function SetContentHeight()
{
	var i = document.getElementById("subnav");
	var c = document.getElementById("contentdummy");
	var h;

	if(!i) return;
	if(!c) return;

	if(!MyOriginalContentHeight)
		MyOriginalContentHeight=c.offsetHeight;

	if(c.offsetHeight<i.offsetHeight)
		h=i.offsetHeight
	else if(MyOriginalContentHeight>i.offsetHeight)
		h=MyOriginalContentHeight;
	else
		h=i.offsetHeight;

	if(h<548)
		h=548;

	c.style.height=h+'px';;

	//alert (i.offsetHeight+" / "+c.style.height);
}
function divanzeigen(name)
{
	var x=document.getElementById(name);
	if(x)
	{  	var rslt = navigator.appVersion.match(/MSIE/, '');
		if(rslt)
			x.style.display='block';
		else
			x.style.display='table-cell';
	}
}


function getFlashMovieObject(movieName)
{
  if (window.document[movieName])
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName];
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function StopFlashMovie(flashid)
{
	var flashMovie=getFlashMovieObject(flashid);
	flashMovie.StopPlay();
}

function ShowSearchResultDetails(gruppe,anzahl)
{
	var d;
	var i;
	for(i=0;i<anzahl;i++)
	{	d=document.getElementById('searchresult_'+gruppe+'_'+i);
		if(d)
			d.style.display='block';
	}
}

function DisplayProductDetailImage(src,i,max)
{
	var d=document.getElementById('prismaproductimagedetaildiv');
	c=document.getElementById('prismaproductimagedetail'+i);		
	if(d && c)
		d.innerHTML=c.innerHTML;
	for(j=0;j<max;j++)
	{
		e=document.getElementById('prismaproductimagethumbdiv'+j);	
		if(i==j)
		{	e.style.border='3px solid #888888';
			e.style.padding='0px';
		}
		else
		{	e.style.border='1px solid #888888';
			e.style.padding='2px';
		}
	}
}

function PrismaUpdateFilters(obj)
{
	if(obj)
	{	if (obj.options[obj.selectedIndex].disabled) {
			var h=document.PrismaProductFilterForm['prev_'+obj.name];
			obj.selectedIndex = h.value;
			return;
		}
	}

	var f=document.PrismaProductFilterForm;
	f.action=MyDocumentRoot+'ajax.php';
	
	$('#PrismaProductFilterForm').ajaxSubmit({   
		success: function(msg){			
			var d=document.getElementById("prismafiltertable");
			d.innerHTML=msg;
			var h=document.getElementById("prismafilterresultnumber");			
			var r=document.getElementById("prismafilterresult");	
			var s=document.getElementById('prismafiltertablesubmit');
			var res=document.getElementById('prismafiltertablereset');
			if(h)
			{	if(r)			
					r.innerHTML=h.innerHTML;
				s.style.display='block';
				res.style.display='block';
			}
   		}

	});

}
function PrismaApplyFilters(pgrid)
{
	var f=document.getElementById("PrismaProductFilterForm");
	var u=document.getElementById("prismafilterurl");
	f.action=u.innerHTML;
	f.submit();
}

function PrismaResetFilters()
{
	var f=document.getElementById("PrismaProductFilterForm");
	var anzahl=f.elements.length;
	for (var i=0;i<anzahl;i++)
	{
		el=f.elements[i];
		if(el.type=='select-one')
			el.selectedIndex=0;
	}
	PrismaUpdateFilters(null);
}


function toogleSlideContent(number, id, controlId, controlClass) {
	$("#"+id+" h3").slideToggle();
	$("#"+id+" table").slideToggle();
	$("#"+id+" div").slideToggle();

	$("#"+controlId).toggleClass(controlClass);
}
function initToogleSlideContent(contentClass, controlClass, controlClassClosed, controlIdOpen) {
	$("."+contentClass+" h3").css("display","none");
	$("."+contentClass+" table").css("display","none");
	$("."+contentClass+" div").css("display","none");
	$("."+controlClass).toggleClass(controlClassClosed);
	if(controlIdOpen) {
		$("."+contentClass+":first h3").css("display","block");
		$("."+contentClass+":first table").css("display","block");
		$("."+contentClass+":first div").css("display","block");
		$("#"+controlIdOpen).toggleClass(controlClassClosed);
	}
}
function toggleCollapseAllContent(contentClass, controlClass, controlClassClosed) {
	$("."+contentClass+" h3").slideUp();
	$("."+contentClass+" table").slideUp();
	$("."+contentClass+" div").slideUp();
	
	$("."+controlClass).addClass(controlClass);
	$("."+controlClass).addClass(controlClassClosed);
}
function toggleExpandAllContent(contentClass, controlClass, controlClassClosed) {
	$("."+contentClass+" h3").slideDown();
	$("."+contentClass+" table").slideDown();
	$("."+contentClass+" div").slideDown();
	$("."+controlClass).removeClass(controlClassClosed);
}
function toggleAllToggleSlideContent(contentClass, controlClass, controlClassClosed) {
	var isOneOpen = 0;
	//alert(contentClass);
	// $(".downloadTableContainer > table").each(function(content) {
	$("."+contentClass).each(function (content) {
		$("."+contentClass+':eq('+content+') table:first').each(function (i) {
			if($(this).css("display")=='block' || $(this).css("display")=='table')
				isOneOpen += 1;
		});
	});
	if(isOneOpen>1) {
		// close All
		$("."+contentClass+" h3").slideUp();
		$("."+contentClass+" table").slideUp();
		$("."+contentClass+" div").slideUp();
		
		$("."+controlClass).addClass(controlClass);
		$("."+controlClass).addClass(controlClassClosed);
	}
	else {
		// open All
		$("."+contentClass+" h3").slideDown();
		$("."+contentClass+" table").slideDown();
		$("."+contentClass+" div").slideDown();
		$("."+controlClass).removeClass(controlClassClosed);
	}
}

function productdetailChangeLargeImage(id,className) {
	$("."+className).css("display","none");
	$("#"+id).css("display","block");
}

function PrismaHideSearchResultGroups(max)
{
	i1=0;
	i2=0;
	i3=0;

	var f1=document.getElementById('prismasearchresultfilter');
	var a1=f1.options.length;
	if(a1==2)
		f1.selectedIndex=1;
	var i1=f1.selectedIndex;
	if(i1>0)
	{	var f2=document.getElementById('prismasearchresultfilter'+i1);
		var a2=f2.options.length;
		if(a2==2)
			f2.selectedIndex=1;
		var i2=f2.selectedIndex;
		if(i2>0)
		{	var f3=document.getElementById('prismasearchresultfilter'+i1+'_'+i2);
			var a3=f3.options.length;
			if(a3==2)
				f3.selectedIndex=1;
			var i3=f3.selectedIndex;
			var o3=f3.options[i3].value;
		}
	}

	//alert(i1+"/"+i2+"/"+i3);

	f=document.getElementById('prismasearchresultfilterdiv');
	f.style.display=(a1>2)?'block':'none';
	for(i=1;i<a1;i++)
	{	
		f=document.getElementById('prismasearchresultfilterdiv'+i);
		f.style.display=((a2>2) && (i==i1))?'block':'none';
		s=document.getElementById('prismasearchresultfilter'+i);
		l2=s.options.length;
		for(j=1;j<l2;j++)
		{	
			f=document.getElementById('prismasearchresultfilterdiv'+i+'_'+j);
			f.style.display=((a3>2) && (i==i1) && (j==i2))?'block':'none';
			s=document.getElementById('prismasearchresultfilter'+i+'_'+j);
			l3=s.options.length;
			//s=document.getElementById('prismasearchresultfilter'+i+'_'+j);
			for(k=1;k<l3;k++)
			{
				hit3=(((i==i1||i1==0) && (j==i2||i2==0) && (k==i3||i3==0)))
				o=s.options[k].value;
				f=document.getElementById('prismasearchresultgroup'+o);
				f.style.display=(hit3)?'block':'none';
			}
		}
	}	
}


function PrismaShowSearchResultGroupFilter(id)
{
	var s=document.getElementById('prismasearchresultgroupfilter'+id);
	var i=s.selectedIndex;
	if(i>0)
	{
		var o=s.options[i].value;
		if(o.match(/^\/|http/i))
		{	document.location.href=o;
		}
		else
		{	var d=document.getElementById('prismasearchresultgroupfilterdiv'+o);
			d.style.display='block';
		}
	}
}
function subnavMouseover(id,color)
{
	var i=document.getElementById('subnavicon'+id);
	i.src=i.src.replace(/_inactive/,'_'+color);

}
function subnavMouseout(id,color)
{
	var i=document.getElementById('subnavicon'+id);
	i.src=i.src.replace('_'+color,'_inactive');
}
function subnav2010Open(id,indent,color)
{
	var d=document.getElementById('subnav2010subnav'+id);
	if(d)
	{	var i=document.getElementById('subnavicon'+id);
		if(d.style.display=='block')
		{	d.style.display='none';
			i.src=i.src.replace('_opened_','_closed_');
			SetContentHeight();
		}
		else
		{	
			if(d.innerHTML!='')
			{
				d.style.display='block';
				i.src=i.src.replace('_closed_','_opened_');
				SetContentHeight();
			}
			else
			{
					var url=MyDocumentRoot+'ajax.php';
				$.get(url
					, {
						ajaxaction:'getSubnav2010',
						indent:indent,
						color:color,
						id:id
					}
					, function(data) {
						d.innerHTML=data;
						d.style.display='block';
						i.src=i.src.replace('_closed_','_opened_');
						SetContentHeight();
					}
				);
			}
		}
	}
}

function DisplayExtendedSearchFilter(tabid,level)
{
	var s=document.getElementById('ExtendedSearchFilter'+tabid+'_'+level);
	var o=s.options[s.selectedIndex];
	var navid=o.value;
	var d=document.getElementById('ExtendedSearchFilterDiv'+tabid+'_'+(level+1));
	if(navid>0)
	{
		var url=MyDocumentRoot+'ajax.php';
		$.get(url
			, {
				ajaxaction:'getExtendedSearchFilter',
				tabid:tabid,
				navid:navid,
				level:(level+1)
			}
			, function(data) {
				d.innerHTML=data;
				d.style.display='block';
				SetContentHeight();
			}
		);
	}
	else
	{	d.innerHTML='';
		SetContentHeight();
	}
}

function ProjectListAddCategory(appendid, name) {
	ProjectListCurrentCategory++;
	var strToAdd = '<br /><input name="'+name+"["+ProjectListCurrentCategory+']" type="text" />';
	$('#'+appendid).append(strToAdd);
}

