function sC(url)
 	{
    	i = new Image();
	i.src = url;
  	}

function dC(url,delay)
	{
	uri=url
	setTimeout("sC(uri)",delay*1000);
	}
function randomToN(maxVal,floatVal)
	{
   	var randVal = Math.random()*maxVal;
    	return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
	}
    	
function jump(obj)
 	{ 
        if(obj.selectedIndex != 0)
        	{ 
        	window.location=obj.options[obj.selectedIndex].value;
        	}
    	} 

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


function writeCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function ampCh(strng)
	{
	strng=strng.replace(/amp23/g, '&amp;');
	return strng;
	}
	
function html_entity_decode(str) 
	{
   	var ta = document.createElement("textarea");
 	ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
	toReturn = ta.value;
        ta = null;
        return toReturn
        }

function implodeAd(query)
	
	{
	var pureAd = query;
	 impAd= encodeURI(pureAd);
	 return impAd;
	}

function encodeUTF8(string) 
	{
        string = string.replace(/\r\n/g,"\n");
        var utftext = "";

        for (var n = 0; n < string.length; n++)
        	{

		    var c = string.charCodeAt(n);

		    if (c < 128) 
			{
			utftext += String.fromCharCode(c);
			}
		    else if((c > 127) && (c < 2048)) 
			{
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
			}
		    else 
			{
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
			}

        	}

        return utftext;
        }

function decodeUTF8(utftext) 
	{
        var string = "";
        var i = 0;
        var c = c1 = c2 = 0;

        while ( i < utftext.length ) 
        	{

		    c = utftext.charCodeAt(i);

		    if (c < 128) 
		    {
			string += String.fromCharCode(c);
			i++;
		    }
		    
		    else if((c > 191) && (c < 224)) 
		    {
			c2 = utftext.charCodeAt(i+1);
			string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
			i += 2;
		    }
		    
		    else 
		    {
			c2 = utftext.charCodeAt(i+1);
			c3 = utftext.charCodeAt(i+2);
			string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
			i += 3;
		    }

		}

        return string;
    	}    
//dropdowmenu ie    	
    	
function startList()
	{
	if (document.all&&document.getElementById)
			{
			navRoot = document.getElementById("nav");
				for (i=0; i<navRoot.childNodes.length; i++)
					{
					node = navRoot.childNodes[i];
						if (node.nodeName=="LI")
							{
							node.onmouseover=function()
								{
								this.className+=" over";
								}
							node.onmouseout=function()
								{
								this.className=this.className.replace(" over", "");
								}
							}
					}
			}
	}	
	

//brandmap dropdown menue	
function selVal()
	{
	gettingBrandsCategory($F('kategorien'));
    	}		
