/* JavaScript  external flash interface 

| Project name  : "FLAX" <<= beta name
| Code name     : FLAX
| Developed by  : Farid Said Al-namrouti
| Date & Time   : 9/2/2009 2:00 PM
*/
// External links to games
function init() {
	var myW=window.open('games/drawing/game.html','judges','width=865,height=685,menubar=no,toobar=no,scrollbars=no,resizable=no');
}


// These functions is extra effects for used from the flash
function mybg(color)  {   // document bgcolor
	var bstyle = document.body.style;
	bstyle.backgroundColor = color;
} 

// These functions enabled the history back and direct page link to flash
function setCurrentFlashPath(path)  {  // set the flash current page path in address bar
	window.location.href="#"+path;
} 
function checkCurrentFlashPath(){
	var path=""+window.location;
	return (path);
}	    

// These functions is extra effects for used from the flash
function diplay_printable(htmlContent,cssFilePath,jsFilePath,printpagename,fullpath){
   var pageHeader='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>MIA- متحف الفن الاسلامي</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="description" content="This is the MIA (Museum of Islamic Art) official website" /><meta name="keywords" content="Museum,Islamic Art,Qatar,Doha,Qatar Museum Authority,Museum of Islamic Art" /><link type="text/css" rel="stylesheet" media="all" href="'+cssFilePath+'"/><script type="text/javascript" language="javascript" src="'+jsFilePath+'"  /></script></head><body>';
   
   fullpath='http://mia.org.qa/english/#'+fullpath;
   var additional='<div id="pageHeader"><div id="bg"><img src="printbg.jpg" /></div><div id="logo"><img src="printlogo.png" /></div><div id="printpagename">'+printpagename+'</div><div id="fullpath">'+fullpath+'</div></div>';
   
   var pageFooter='</body></html>';
   
   var htmlPage=pageHeader+additional+htmlContent+pageFooter;
   
   mywindow = window.open ("","mywindow");
   mywindow.document.write(htmlPage);
   mywindow.document.close();  
}
