function wm_show_iframecode(text)
{
 var wm_demo=window.open('','code','toolbar=no,scrollbars=yes,width=440,height=200');
 wm_demo.document.open();
 wm_demo.document.write(text);
 wm_demo.document.close();
}

function wm_show_iframeexample(url,mode)
{
 if(mode==1)
 var wm_demo=window.open(url,'code','toolbar=no,scrollbars=yes,width=600,height=400');
 else
 var wm_demo=window.open(url,'code','toolbar=no,scrollbars=yes,width=800,height=1000');
}

function wm_filldemoframe(url)
{
 $.ajax({ 
   type: 'POST', 
   url: url, 
   async: false, 
   success: function(data){ 
     $('#testframe').empty(); 
     $('#testframe').html(data); 
	 var w=$('#testframe').width();
	 $('#demoframe').width(w);
	 var h=$('#testframe').height();
	 h=h+50;
	 $('#demoframe').height(h);
	 var txt=$('#iframepars').html();
	 txt=txt.replace('$iframewidth',''+w+'px');
	 txt=txt.replace('$iframeheight',''+h+'px');
	 $('#iframepars').html(txt);
	 var txt=$('#jspars').html();
	 txt=txt.replace('$iframewidth',''+w+'px');
	 txt=txt.replace('$iframeheight',''+h+'px');
	 $('#jspars').html(txt);
	 
   }, 
   error: function(data){ 
    alert( "AJAX Error: " + data);
   } 
 });
}

function wm_activatedemoframe()
{
 $('#demoframe').show();
}



