
	var intAdContentTimer	= 0;
	//========================================================================
	function topAd_ScrollContent(intAdID) {

		objAdContentDiv		= document.getElementById('topAnnonceContent_' + intAdID);

		if(parseInt(objAdContentDiv.offsetHeight) > 90) {

			if(parseInt(objAdContentDiv.style.top) < parseInt(-objAdContentDiv.offsetHeight))
				objAdContentDiv.style.top	= 90;
			else
				objAdContentDiv.style.top	= parseInt(objAdContentDiv.style.top) - 1;
	
			intAdContentTimer	= setTimeout('topAd_ScrollContent(' + intAdID + ')', 50	);
		}
	}

	//========================================================================
	function topAd_ScrollText(intAdID, intDummy) {
		
		objAdDiv		= document.getElementById('topAnnonce_' + intAdID);

		if(parseInt(objAdDiv.style.left) < parseInt(-objAdDiv.offsetWidth))
			objAdDiv.style.left	= 227;
		else
			objAdDiv.style.left	= parseInt(objAdDiv.style.left) - 1;

		if(parseInt(objAdDiv.offsetWidth) == 0 || parseInt(objAdDiv.offsetWidth) > 227)
			setTimeout('topAd_ScrollText(' + intAdID + ',1)', 40);
		else
			objAdDiv.style.left	= 0;
	}
	
	//========================================================================
	function setOptionValue(strInputID,strValue) {
		if(strValue != '')
			setTimeout('document.getElementById("' + strInputID  + '").value=' + strValue, 100);
	}
	
	function setPriceSpanText(intValue) {
		
		objPriceSpanDiv		= document.getElementById('priceSpan');
		
		if(intValue == 1)
			objPriceSpanDiv.innerHTML	= 'Pris';
		else
			objPriceSpanDiv.innerHTML	= 'Maxpris';
			
		return true;
	}


	function displayCategories() {
		
		objCategoryDiv			= document.getElementById('categoryDiv');
		objButton			= document.getElementById('categoryButtonImg');
		
		if(objCategoryDiv.style.display == '') {
			objCategoryDiv.style.display	= 'none';
			objButton.src			= '/image/viskategorier.gif';
		}
		else {
			objCategoryDiv.style.display	= '';
			objButton.src			= '/image/skjulkategorier.gif';
		}

		var dtmExpireDate			= new Date();
		dtmExpireDate.setTime(dtmExpireDate.getTime() + 365 * 24 * 60 * 60 * 1000);

		setCookie('categorylist', objCategoryDiv.style.display, dtmExpireDate, '/');

	}
	
	function setCookie(name, value, expires, path, domain, secure) {
		var curCookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
		document.cookie = curCookie;
	}
	
	//============================================================
	// showBanDialog ( intAdID )
	// Steffen S. Mortensen
	//============================================================
	function showBanDialog ( objCallingLink, intAdID ) {
	
		
		
		
		//document.write('<DIV STYLE="POSITION : absolute;BORDER : 1px solid #808080; WIDTH : 100px; HEIGHT : 100px;"></DIV>');
		document.close();
	}