
	document.domain	= 'computerworld.dk'; // we need to do this because cross-domain security

	/* javascript for pricerunner iframe */
	var isIframe	= (parent != self);

	if (isIframe) {	

		window.onload	= function() {

			/* get the first div tag */
			var outerDiv			= document.getElementById('maincontent');
			
			if( outerDiv ) {
				if( outerDiv.parentNode )
					outerDiv	= outerDiv.parentNode;
			}
			
			var outerDivHeight		= ( outerDiv.offsetHeight + 50 ); // we add some pix to be sure 
			window.parent.resizeIframe( outerDivHeight );

			/* try to rewrite all a tags */
			var anchors		= document.getElementsByTagName('a');

			for( var i=0; i < anchors.length; i++) {
				
				var linkHref			= anchors[i].href;
				
				if( ( anchors[i].target == '' ) && ( linkHref.toLowerCase().substring(0,11) != 'javascript:' && linkHref != (location.href + '#')  )) {
					anchors[i].target	= '_top';
					anchors[i].href		= 'http://www.computerworld.dk/pristjek' + anchors[i].href.substring( 32 );
				}
			}
			
		};
	} else {
	}
	
	function resizeIframe( height ) {
		$('pricerunnerFrame').style.height		= height + 'px';
	}

	function doSearch() {
	
		var searchQuery		= $F('prQ');
				
		if( searchQuery != '' ) {
			return true;
		} else {
			return false;
		}
		
		return false;	
	}
	
	
	
	
