
function showModalPanel(filtervars)
{
	var newModal;
	newModal = new YAHOO.widget.Dialog("modalDialog", {
		modal: true,
		fixedcenter: true,
		close: false,
		draggable: false,
		zindex: 4,
		width: "500px", 
		height: "470px", 
		visible: false,
		underlay: "none"
		});
	
	var body = "<div id='modal'>";
	body +=	"<div class='hd'><a id='closeLink' href='/2008/850.aspx'>Close window</a></div>";
	body +=	"<div class='bd' style='margin: 0pt;height:460px;'>";
	body +=	"<iframe height='450' name='schedjoulesIframe' width='500' frameborder='0' src='http://canalplus.clients.schedjoules.com/render?language="+this.language;
	//	body +=	"<iframe height='380' width='550' frameborder='0' src='' />";
	if(filtervars!="")
	{
		body += "&"+filtervars;
	}
	body += "'></iframe>";
	body +=	"</div>";
	body +=	"</div>";
	newModal.setBody(body);
	
	newModal.render(document.body);
	YAHOO.util.Dom.setStyle("modalDialog", 'display', 'block');
	YAHOO.util.Event.on('closeLink', 'click', function(e){newModal.hide();YAHOO.util.Event.preventDefault(e);});
	newModal.show();
}

function openSchedjoules(filtervars) {
	//this.view=_view;
	//this.filter=_filter;
	//this is set from url
	this.language="en";
	showModalPanel(filtervars);
	return false;
}

function Schedjoules()
{
	//this.view="";
	//this.filter="";
	this.language="";
	this.open=showModalPanel
}
