function loadIframe(width, height, url, title){
	$().ready(function() {
	blockPage();
	html = '<table border="0" width="'+width+'" cellpadding="0" cellspacing="0">'
	html += '<tr class="th" style="width:'+width+'px;">'
	html += '	<td width="95%" class="ui-widget-header" style="cursor:move;"><span id="box-title">' + title + '</span></td>'
	html += '	<td width="5%" align="right"><span id="box-title" style="text-align:left;">'
	html += '		<span onClick="hideBox()" style="text-align:right;cursor:pointer;font-weight:bold;font-size:15px;">';
	html += '			<b>&nbsp;X&nbsp;</b>'
	html += '		</span>';
	html += '	</td>'
	html += '</tr>'
	html += '<tr style="height:5px;"><td colspan="2">&nbsp;</td></tr>'
	html += '</table>'

	$('#loadFrameBox').html(html)
	
	$iframe = $('<iframe src="'+ url +'" name="'+ url +'" frameborder="0" scrolling="auto" hspace="0" width="'+ width +'" height="'+ height +'"></iframe>');			
		// On iframe load
		$iframe.load(function(){				
			// Show box
			showBox(width, height , title);	
		}).appendTo('#loadFrameBox');
		
	});
}
function blockPage(){
	$(document).ready(function(event) {
		w = $(document).width();
		h = $(document).height();
		$('#block').css({width: w+'px', height:h+'px'}).show();
	});
}
function showBox (w, h, title) {
	le = ($(document).width()/2) - (w/2) ;
	to = 57;
	$('#box-title').html(title);
	$('#loadFrameBox').css({top: to+'px', 'left':le+'px'}).slideDown(500);
}
function hideBox(){
	$('#block').hide();
	///$('#loadFrameBox').html("");
	$('#loadFrameBox').slideUp(500);
}
$(function() {
	$("#loadFrameBox").draggable({ handle: 'p' });
});

function loadUrl(url){
     window.location = url
}
 $(document).ready(function() {
      $("#hide-menu-bt").click(function(){
		$("#show-menu-bt").show(); 
         $("#leftmenu").hide( "blind", 
                     {direction: "horizontal"}, 1000 );
		 $(this).hide();
      });
      $("#show-menu-bt").click(function(){
		  $("#hide-menu-bt").show(); 
         $("#leftmenu").show( "blind", 
                      {direction: "horizontal"}, 1000 );
		 $(this).hide(); 
      });
   });
   function unblockPage(){
	$('#block').hide();
  }

function swapImage(img1, img2){
   img1.src = img2;
}
function displayPopup(strHeight,strWidth,strURL) {
	self.name = "listings"; // names current window as "listings"
	var windowprops = "toolbar=0,location=no,directories=0,status=0," + "menubar=0,scrollbars=1,resizable=1,left=100,top=100,height=" + strHeight + ",width=" + strWidth;
	OpenWindow = window.open(strURL, "remote", windowprops); 
}


