<?php 
	if(!$this->ifr){
		print_r($this->htmlContent);
	}else{
		?>
			//Generate javascript functions which can be used to output iframe html
			function renderGadget<?=$this->uid?>(target_id){
				document.getElementById(target_id).innerHTML = ('<iframe id="iframe<?=$this->uid?>" width="100%" scrolling=no height="100%" frameborder="0" marginheight="0" marginwidth="0" src="http://<?=$_SERVER["HTTP_HOST"]?>/gadget/index?xml=<?=$this->iframe_src?>"></iframe>');
			}
			renderGadget<?=$this->uid?>("div<?=$this->uid?>");
		<?php 
	}
	
?>