var tiw;
function witchVersion(name,url,w,h,path,visus)
 {		
    	if  ( (navigator.userAgent.toLowerCase().indexOf("6")!=-1)|| (navigator.userAgent.toLowerCase().indexOf("5.5")!=-1) ){ 
			if (visus=="chrom690.jpg")	visus="chrom691.jpg";
			else
			{	if (visus=="chrom590.jpg")	visus="chrom591.jpg";
				else
				{	if (visus=="chrom725.jpg")	visus="chrom726.jpg";
					else visus="chrom491.jpg";
				}
			}
            MyFunction(name,url,w,h,path,visus)  ;
        }
        else {	
            openIT(url,w,h,path,visus)  ;
        }
 }

function openIT(theURL,W,H,path,visus) {

	wname ="CHROMELESSWIN"
	windowCERRARa 		= path+"../images/chromlessfr/close_g1.gif"
	windowCERRARd 		= path+"../images/chromlessfr/close_g1.gif"
	windowCERRARo 		= path+"../images/chromlessfr/close_n1.gif"
	windownone1grf 		= path+"../images/chromlessfr/"+visus
	windowCLOCK  		= path+"../images/chromlessfr/clock.gif"
	windowREALtit		= "Diwan Al Madhalim by eMAGIN"
	windowTIT 	    	= ""
	windowBORDERCOLOR   	= "#18486E"
	windowBORDERCOLORsel	= "#18486E"
	windowTITBGCOLOR    	= "#FFFFFF"
	windowTITBGCOLORsel 	= "#FFFFFF"
	openchromeless(theURL,path,visus,wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windownone1grf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}

// chromeless windows v2.1
// www.microbians.com / Gabriel Suchowolski power[z]one - powerz@microbians.com
//
// Distributed under the terms of the GNU Library General Public License
//
// - Chromeless trick by webFX. http://www.eae.net/webfx/
// - Chromeless mouse control to handled like a normal window by Gabriel Suchowolski power[z]one

function openchromeless(theURL,path,visus, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windownone1grf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel) {

	var windowW = W;
	var windowH = H;
	var windowX = Math.ceil( (window.screen.width  - windowW) / 2 );
	var windowY = Math.ceil( (window.screen.height - windowH) / 2 );

	if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4) isie=true
	else											     isie=false

	if (isie) { H=H+20+2; W=W+2; }

	s = ",width="+W+",height="+H;

	if (isie && (navigator.userAgent.toLowerCase().indexOf("win")!=-1) ) {

var dowin = theURL != "" ? true : false;
var chromeTIThtml = '\n' +
'<html>																							'+ '\n'+
'<head>                                                                                                                                                                         	'+ '\n'+
'<title> CHROMELESS WINDOWS / TITLEBAR</title>                                                                                                                      		'+ '\n'+
'<style type="text/css">                                                                                                                                                        	'+ '\n'+
'#mywindowTITLE 	{ position: absolute; left:   0px; top:   0px; width: 100%; height: 40px; z-index: 1; background-color: '+windowTITBGCOLOR+'; clip:rect(0,100%,40,0); }         '+ '\n'+
'#mywindow 		{ position: absolute; left:   0px; top:   0px; width: 100%; height: 40px; z-index: 2; clip:rect(0,100%;40,0); }         '+ '\n'+
'#mywindowCLOSE 	{ position: absolute; left: 0px; top: 0px; width: 11px; height: 11px; z-index: 3; clip:rect(0,11,11,0);   }         '+ '\n'+
'#mywindowCLOCK 	{ position: absolute; left: 0px; top: 0px; width: 11px; height: 11px; z-index: 3; clip:rect(0,11,11,0);   }         '+ '\n'+
'</style>                                                                                                                                                                       	'+ '\n'+
'<script language="javascript">																				'+ '\n'

if ( theURL != "" ) {

chromeTIThtml = chromeTIThtml + 
'	theURL 	    	    = "'+theURL			+'"                                                                                                                             '+ '\n'+
'	windowCERRARa 	    = "'+windowCERRARa		+'"                                                                                                                             '+ '\n'+
'	windowCERRARd 	    = "'+windowCERRARd		+'"                                                                                                                             '+ '\n'+
'	windowCERRARo 	    = "'+windowCERRARo		+'"                                                                                                                             '+ '\n'+
'	windowCLOCK         = "'+windowCLOCK            +'"                                                                                                                             '+ '\n'+
'	windowBORDERCOLOR   = "'+windowBORDERCOLOR	+'"                                                                                                                             '+ '\n'+
'	windowBORDERCOLORsel= "'+windowBORDERCOLORsel	+'"                                                                                                                             '+ '\n'+
'	windowTITBGCOLOR    = "'+windowTITBGCOLOR	+'"                                                                                                                             '+ '\n'+
'	windowTITBGCOLORsel = "'+windowTITBGCOLORsel	+'"                                                                                                                             '+ '\n'

} else {

chromeTIThtml = chromeTIThtml + 
'	theURL="about:blank"                                                                                                                                                            '+ '\n'+
'	windowCERRARa 		= "images/close_g1.gif"                                                                                                                                     '+ '\n'+
'	windowCERRARd 		= "images/close_g1.gif"                                                                                                                                     '+ '\n'+
'	windowCERRARo 		= "images/close_n1.gif"                                                                                                                                     '+ '\n'+
'	windowCLOCK         	= "images/clock.gif"                                                                                                                             		'+ '\n'+
'	windowTIT 	    	= "<font face=verdana size=1>&nbsp;  window title</font>"                                                                                               '+ '\n'+
'	windowBORDERCOLOR   	= "#FFFFFF"                                                                                                                                             '+ '\n'+
'	windowBORDERCOLORsel	= "#FF8A00"                                                                                                                                             '+ '\n'+
'	windowTITBGCOLOR    	= "#FFFFFF"                                                                                                                                             '+ '\n'+
'	windowTITBGCOLORsel 	= "#FFFFFF"                                                                                                                                             '+ '\n'

}

chromeTIThtml = chromeTIThtml + 
'var windowCERRARImg_a = new Image(); windowCERRARImg_a.src = windowCERRARa;                                                                                                            '+ '\n'+
'var windowCERRARImg_d = new Image(); windowCERRARImg_d.src = windowCERRARd;                                                                                                            '+ '\n'+
'var windowCERRARImg_o = new Image(); windowCERRARImg_o.src = windowCERRARo;                                                                                                            '+ '\n'+
'var windowCLOCKImg    = new Image();    windowCLOCKImg.src = windowCLOCK;                                                                                                              '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'function mouseSTATUS() {                                                                                                                                                               '+ '\n'+
'	this.x       = null;                                                                                                                                                            '+ '\n'+
'	this.y       = null;                                                                                                                                                            '+ '\n'+
'	this.bt      = "up";                                                                                                                                                            '+ '\n'+
'	this.oldx    = null;                                                                                                                                                            '+ '\n'+
'	this.oldy    = null;                                                                                                                                                            '+ '\n'+
'	this.dx      = null;                                                                                                                                                            '+ '\n'+
'	this.dy      = null;                                                                                                                                                            '+ '\n'+
'	this.screeny = null;                                                                                                                                                            '+ '\n'+
'	this.screenx = null;                                                                                                                                                            '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	this.element = null;                                                                                                                                                            '+ '\n'+
'	this.event   = null;                                                                                                                                                            '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'var mouse = new mouseSTATUS();                                                                                                                                                         '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'function actualizateMouseSTATUS(e) {                                                                                                                                                   '+ '\n'+
'	if (!e) var e = event                                                                                                                                                           '+ '\n'+
'	if ( (e.type=="mousedown" || e.type=="mouseup") && e.button!=1) return true                                                                                                     '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	var x=e.x+document.body.scrollLeft                                                                                                                                              '+ '\n'+
'	var y=e.y+document.body.scrollTop                                                                                                                                               '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	mouse.x   = x;                                                                                                                                                                  '+ '\n'+
'	mouse.y   = y;                                                                                                                                                                  '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	     if ( e.type == "mousedown" ) mouse.bt = "down";                                                                                                                            '+ '\n'+
'	else if ( e.type == "mouseup" )   mouse.bt = "up";                                                                                                                              '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'	if (window.event) {                                                                                                                                                             '+ '\n'+
'		mouse.screenx=window.event.screenX;                                                                                                                                     '+ '\n'+
'		mouse.screeny=window.event.screenY;                                                                                                                                     '+ '\n'+
'	} else {                                                                                                                                                                        '+ '\n'+
'		mouse.screenx=-1;                                                                                                                                                       '+ '\n'+
'		mouse.screeny=-1;                                                                                                                                                       '+ '\n'+
'	}                                                                                                                                                                               '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'function initMouseEvents() {                                                                                                                                                           '+ '\n'+
'	document.onmousedown = actualizateMouseSTATUS                                                                                                                                   '+ '\n'+
'	document.onmousemove = actualizateMouseSTATUS                                                                                                                                   '+ '\n'+
'	document.onmouseup   = actualizateMouseSTATUS                                                                                                                                   '+ '\n'+
'	document.onselectstart = selectstart                                                                                                                                            '+ '\n'+
'	document.ondragstart   = new Function("actualizateMouseSTATUS(event); return false;")                                                                                           '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'                                                                                                                                                                                       '+ '\n'+
'function selectstart(){                                                                                                                                                                '+ '\n'+
'	if ( event.srcElement.tagName != "INPUT" && event.srcElement.tagName != "TEXTAREA") { return false; }                                                                           '+ '\n'+
'	else { mouse.bt="up"; return true; }                                                                                                                                            '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'																							'+ '\n'+
'initMouseEvents()                                                                                                                                                                      '+ '\n'+
'																							'+ '\n'+
'var mywindowbt    ="up";                                                                                                                                                               '+ '\n'+
'var wincloseSTATUS="up";                                                                                                                                                               '+ '\n'+
'																							'+ '\n'+
'var ofx=0;                                                                                                                                                                             '+ '\n'+
'var ofy=0;                                                                                                                                                                             '+ '\n'+
'var opx=0;                                                                                                                                                                             '+ '\n'+
'var opy=0;                                                                                                                                                                             '+ '\n'+
'var px=0;                                                                                                                                                                              '+ '\n'+
'var py=0;                                                                                                                                                                              '+ '\n'+
'																							'+ '\n'+
'var wcpx1=-1, wcpy1=-1;                                                                                                                                                                '+ '\n'+
'var wcpx2=-1, wcpy2=-1;                                                                                                                                                                '+ '\n'+
'																							'+ '\n'+
'var wclosechanged = false;                                                                                                                                                             '+ '\n'+
'																							'+ '\n'+
'function initToMoveWin() {                                                                                                                                                             '+ '\n'+
'		if (wincloseSTATUS=="up" && ( mywindowbt=="up" || mywindowbt=="over") ) {                                                                                               '+ '\n'+
'					                                                 												'+ '\n'+
'				if ( parent.mainloaded ) document.all["mywindowCLOCK"].style.visibility = "hidden";                                                 			'+ '\n'+
'					                                                 												'+ '\n'+
'				document.all["mywindowCLOCK"].style.pixelLeft=document.body.clientWidth-36 										'+ '\n'+
'				document.all["mywindowCLOCK"].style.pixelTop =4                                                                         				'+ '\n'+
'					                                                 												'+ '\n'+
'				wcpx1 = document.all["mywindowCLOSE"].style.pixelLeft=document.body.clientWidth-16                                                                      '+ '\n'+
'				wcpy1 = document.all["mywindowCLOSE"].style.pixelTop =5                                                                                                 '+ '\n'+
'				wcpx2 = wcpx1 + 12 - 1                                                                                                                                  '+ '\n'+
'				wcpy2 = wcpy1 + 12 - 1                                                                                                                                  '+ '\n'+
'				if ( mouse.x >= wcpx1 && mouse.x <= wcpx2 && mouse.y >= wcpy1 && mouse.y <= wcpy2) {                                                                    '+ '\n'+
'					if (wclosechanged == false) {                                                                                                                   '+ '\n'+
'						document.all["mywindowCLOSE"].document.images["closewin"].src=windowCERRARImg_o.src                                                     '+ '\n'+
'						wclosechanged = true                                                                                                                    '+ '\n'+
'					}                                                                                                                                               '+ '\n'+
'						                                                                                                                                        '+ '\n'+
'				} else if (wclosechanged == true) {                                                                                                                     '+ '\n'+
'					document.all["mywindowCLOSE"].document.images["closewin"].src=windowCERRARImg_d.src                                                             '+ '\n'+
'					wclosechanged = false                                                                                                                           '+ '\n'+
'				}                                                                                                                                                       '+ '\n'+
'		}                                                                                                                                                                       '+ '\n'+
'																							'+ '\n'+
'		     if (   mouse.y <= 40 && mouse.y >= 1   && mywindowbt == "up"   && mouse.bt =="up"    ) { mywindowbt = "over" }                                                     '+ '\n'+
'		else if ( ( mouse.y  > 40 || mouse.y <  1 ) && mywindowbt == "over" && mouse.bt =="up"    ) { mywindowbt = "up"   }                                                     '+ '\n'+
'		else if (   mouse.y <= 40 && mouse.y >= 1   && mywindowbt == "over" && mouse.bt == "down" ) {                                                                           '+ '\n'+
'			self.window.focus();                                                                                                                                            '+ '\n'+
'	                                                                                                                                                                                '+ '\n'+
'			if ( mouse.x >= wcpx1 && mouse.x <= wcpx2 && mouse.y >= wcpy1 && mouse.y <= wcpy2 ) {                                                                           '+ '\n'+
'				wincloseSTATUS="down"                                                                                                                                   '+ '\n'+
'				document.all["mywindowCLOSE"].document.images["closewin"].src=windowCERRARImg_a.src                                                                     '+ '\n'+
'			} else {                                                                                                                                                        '+ '\n'+
'				document.all["mywindowTITLE"].style.backgroundColor = windowTITBGCOLORsel                                                                               '+ '\n'+
'				document.body.style.borderColor    = "#FFFFFF"                                                                                               '+ '\n'+
'				parent.chromewinb.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.chromewinl.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.chromewinr.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.iconL.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.iconR.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.gauch.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.haut.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.droite.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.gauchbat.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.droitebat.document.bgColor = windowBORDERCOLORsel                                                                                               '+ '\n'+
'				parent.bat.document.bgColor = "#FFFFFF"                                                                                               '+ '\n'+
'				ofx =  mouse.x;                                                                                                                                         '+ '\n'+
'				ofy =  mouse.y;                                                                                                                                         '+ '\n'+
'				opx =  mouse.x;                                                                                                                                         '+ '\n'+
'				opy =  mouse.y;                                                                                                                                         '+ '\n'+
'			}	                                                                                                                                                        '+ '\n'+
'			mywindowbt="down";                                                                                                                                              '+ '\n'+
'		}                                                                                                                                                                       '+ '\n'+
'		else if ( mouse.bt =="up" && mywindowbt == "down" ) {                                                                                                                   '+ '\n'+
'			mywindowbt="up";                                                                                                                                                '+ '\n'+
'			ofx=0;                                                                                                                                                          '+ '\n'+
'			ofy=0;                                                                                                                                                          '+ '\n'+
'			opx=0;                                                                                                                                                          '+ '\n'+
'			opy=0;                                                                                                                                                          '+ '\n'+
'																							'+ '\n'+
'			if ( mouse.x >= wcpx1 && mouse.x <= wcpx2 && mouse.y >= wcpy1 && mouse.y <= wcpy2 && wincloseSTATUS=="down" ) { top.window.close() }                            '+ '\n'+
'																							'+ '\n'+
'			wincloseSTATUS="up"                                                                                                                                             '+ '\n'+
'		                                                                                                                                                                        '+ '\n'+
'			if ( document.all["mywindowTITLE"] ) {                                                                                                                          '+ '\n'+
'				document.all["mywindowTITLE"].style.backgroundColor = windowTITBGCOLOR                                                                                  '+ '\n'+
'				document.body.style.borderColor   = "#FFFFFF"                                                                                                   '+ '\n'+
'				parent.chromewinb.document.bgColor= windowBORDERCOLOR                                                                                                   '+ '\n'+
'				parent.chromewinl.document.bgColor= windowBORDERCOLOR                                                                                                   '+ '\n'+
'				parent.chromewinr.document.bgColor= windowBORDERCOLOR                                                                                                   '+ '\n'+
'				parent.gauch.document.bgColor = windowBORDERCOLOR                                                                                               '+ '\n'+
'				parent.haut.document.bgColor = windowBORDERCOLOR                                                                                               '+ '\n'+
'				parent.droite.document.bgColor = windowBORDERCOLOR                                                                                               '+ '\n'+
'				parent.gauchbat.document.bgColor = windowBORDERCOLOR                                                                                               '+ '\n'+
'				parent.droitebat.document.bgColor = windowBORDERCOLOR                                                                                               '+ '\n'+
'				parent.iconL.document.bgColor= windowBORDERCOLOR                                                                                                   '+ '\n'+
'				parent.iconR.document.bgColor= windowBORDERCOLOR                                                                                                   '+ '\n'+
'				parent.bat.document.bgColor = "#FFFFFF"                                                                                               '+ '\n'+
'			}                                                                                                                                                               '+ '\n'+
'																							'+ '\n'+
'		}                                                                                                                                                                       '+ '\n'+
'		else if ( mywindowbt == "down" && wincloseSTATUS == "up") {                                                                                                             '+ '\n'+
'			var m_scrx = mouse.screenx;                                                                                                                                     '+ '\n'+
'			var m_scry = mouse.screeny;                                                                                                                                     '+ '\n'+
'			opx = px + ofx - m_scrx;                                                                                                                                        '+ '\n'+
'			opy = py + ofy - m_scry;                                                                                                                                        '+ '\n'+
'			px = m_scrx - ofx;                                                                                                                                              '+ '\n'+
'			py = m_scry - ofy;                                                                                                                                              '+ '\n'+
'			top.window.moveTo(px , py);                                                                                                                                     '+ '\n'+
'		}                                                                                                                                                                       '+ '\n'+
'	setTimeout("initToMoveWin()",50);                                                                                                                                               '+ '\n'+
'}                                                                                                                                                                                      '+ '\n'+
'</script>                                                                                												'+ '\n'+
'</head>                                                                                                                                                                        	'+ '\n'+
'<body TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=no style="border: 0px solid #18486E; overflow: hidden; margin: 0pt;" bgcolor='+windowTITBGCOLOR+'>  '+ '\n'+
'<table border=0 cellspacing="0" cellpadding="0" width="100%" height="39px">  '+ '\n'+
'<tr><td background="'+path+'../images/chromlessfr/filet.jpg" valign="top"><img src="'+path+'../images/chromlessfr/'+visus+'"></td><td background="'+path+'../images/chromlessfr/filet.jpg"><div id=mywindowCLOSE> '+ '\n'+
'<img name=closewin src="'+path+'../images/chromlessfr/close_g1.gif" border=0 alt="Close"></div></td><td background="'+path+'../images/chromlessfr/filet.jpg"><div id=mywindowCLOCK> '+ '\n'+
'<img name=clockwin src="'+path+'../images/chromless/rien.gif" border=0 width=0 height=0></div></td></tr>  '+ '\n'+
'</table></body>                                                                                                                                                                        	'+ '\n'+
'<script>initToMoveWin();</script>																			'+ '\n'+
'</html>                                                                                                                                                                        	'+ '\n'

var chromeFRMhtml = '' +
'<HTML>																		'+ '\n'+
'<HEAD>                                                                         								'+ '\n'+
'<TITLE>'+ windowREALtit +'</TITLE>                                          									'+ '\n'+
'</HEAD>                                                                        								'+ '\n'+
'<script> 																	'+ '\n'+
'mainloaded = false																'+ '\n'+
'function generatetitle() { 															'+ '\n'+
'	if( window.frames["chromewint"] && window.frames["chromewinl"] && window.frames["chromewinb"] && window.frames["chromewinr"] ) {	'+ '\n'+
'		chromewint.document.open();													'+ '\n'+
'		chromewint.document.write( "'+ quitasaltolinea(chromeTIThtml) +'" );								'+ '\n'+
'		chromewint.document.close();													'+ '\n'+
'		iconmain.document.open();													'+ '\n'+
'		iconmain.document.close();													'+ '\n'+
'		chromewinl.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		bat.document.bgColor = "#FFFFFF"                                                                                               '+ '\n'+
'		gauch.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		haut.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		droite.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		gauchbat.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		droitebat.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		iconL.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		iconR.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		chromewinb.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'		chromewinr.document.bgColor="'+ windowBORDERCOLOR +'"										'+ '\n'+
'	} else {																'+ '\n'+
'		setTimeout("generatetitle()",20)												'+ '\n'+
'	}																	'+ '\n'+
'}																		'+ '\n'+
'generatetitle()																'+ '\n'+
'</script>																	'+ '\n'+
'<frameset border=0 framespacing=0 frameborder=0 rows="40,100%,20,1" onload="mainloaded=true" onreadystatechange="generatetitle()">		'+ '\n'+
'	<frameset border=0 framespacing=0 frameborder=0 rows="1,100%,1">        								'+ '\n'+
'		<frame name=haut src="about:blank" scrolling=no noresize> 								'+ '\n'+
'		<frameset border=0 framespacing=0 frameborder=0 cols="1,100%,1">        								'+ '\n'+
'			<frame name=gauch src="about:blank" scrolling=no noresize> 								'+ '\n'+
'			<frame name=chromewint src="about:blank" scrolling=no noresize>  									'+ '\n'+
'			<frame name=droite src="about:blank" scrolling=no noresize> 								'+ '\n'+
'		</frameset>                                                             								'+ '\n'+
'		<frameset border=0 framespacing=0 frameborder=0 cols="1,100%,1">        								'+ '\n'+
'			<frame name=gauchbat src="about:blank" scrolling=no noresize> 								'+ '\n'+
'			<frame name=bat src="about:blank" scrolling=no noresize>  									'+ '\n'+
'			<frame name=droitebat src="about:blank" scrolling=no noresize> 								'+ '\n'+
'		</frameset>                                                             								'+ '\n'+
'	</frameset>                                                             								'+ '\n'+
'	<frameset border=0 framespacing=0 frameborder=0 cols="1,100%,1">        								'+ '\n'+
'		<frame name=chromewinl src="about:blank" scrolling=no noresize> 								'+ '\n'+
'		<frame name=main       src="'+theURL+'">                   									'+ '\n'+
'		<frame name=chromewinr src="about:blank" scrolling=no noresize> 								'+ '\n'+
'	</frameset>                                                             								'+ '\n'+
'	<frameset border=0 framespacing=0 frameborder=0 cols="1,100%,1">        								'+ '\n'+
'		<frame name=iconL src="about:blank" scrolling=no noresize> 								'+ '\n'+
'		<frame name=iconmain src="about:blank" scrolling=no noresize>                   									'+ '\n'+
'		<frame name=iconR src="about:blank" scrolling=no noresize> 								'+ '\n'+
'	</frameset>                                                             								'+ '\n'+
'	<frame name=chromewinb src="about:blank" scrolling=no noresize>         								'+ '\n'+
'</frameset>                                                                    								'+ '\n'+
'</HTML>                                                                        								'

		splashWin = window.open( "" , wname, "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0"+s);

		splashWin.resizeTo( Math.ceil( W )       , Math.ceil( H ) );
		splashWin.moveTo  ( Math.ceil( windowX ) , Math.ceil( windowY ) );

		splashWin.document.open();
		splashWin.document.write( chromeFRMhtml );
		splashWin.document.close();
		tiw = splashWin;

	}
	else    {
		var splashWin = window.open(theURL, wname, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1"+s, true);
	}

	splashWin.focus();
}                                                                               
                                                                                
function quitasaltolinea(txt) {

  var salida = txt.toString()
  var re     = /\\/g; var salida = salida.replace(re, "\\\\");
  var re     = /\//g; var salida = salida.replace(re, "\\\/");
  var re     = /\"/g; var salida = salida.replace(re, "\\\"");
  var re     = /\'/g; var salida = salida.replace(re, "\\\'");
  var re     = /\n/g; var salida = salida.replace(re, "\\n");
  var re     = /  /g; var salida = salida.replace(re, "");
  var re     = /\t/g; var salida = salida.replace(re, "");
  var re     = /\r/g; var salida = salida.replace(re, "");

  return salida

}


////////////////////////////////////////////////////////////////
//                                                            //
//           BYKLEIN CHROMELESS WINDOW OBJECT 1.0             //
//             FOR MICROSOFT IEXPLORER 5.5 & UP               //
//                                                            //
//   (c) Copyright 2002. Mariano Klein || www.byklein.com     //
//         Distributed under the terms of the GNU GPL         //
//                                                            //
//    Thanks to Gabriel Suchowolski || www.microbians.com     //
////////////////////////////////////////////////////////////////
function MyFunction(MyName,MyURL,MyW,MyH,path,visus)
{ 
 var myChromeless = new ChromelessWindow();
 myChromeless.path = path;
 myChromeless.visus = visus;
 myChromeless.URL = MyURL;
 // myChromeless.URL = "ByKlein_Chromeless/chromelessContent.htm";
 myChromeless.title = "Diwan Al Madhalim";
 myChromeless.titlebarImage=path+"../images/chromlessfr/"+visus;
 //myChromeless.titlebarImage="MyTitleBarImage.gif";
 myChromeless.titlebarHeight = 40;
 myChromeless.titleFont = "Arial";
 myChromeless.titleSize = 14;
 myChromeless.titleColor = "#FFFFFF";
 myChromeless.scrollbars = "yes";
 myChromeless.w = MyW
 myChromeless.h = MyH
 //myChromeless.w = 568; //width
 //myChromeless.h = 460; //height
 myChromeless.centered = "yes";
 myChromeless.xPos = 0;
 myChromeless.yPos = 0;
 myChromeless.borderColor = "#660066";
 myChromeless.borderSize = 1;
 myChromeless.minimizeBottom = path+"../images/minimizar.gif";
 myChromeless.closeBottom = path+"../images/chromlessfr/close_g1.gif";
 //myChromeless.minimizeBottom = "MyMinimizeImage.gif";
 //myChromeless.closeBottom = "MyCloseImage.gif";
 myChromeless.name = MyName;
 myChromeless.openChromelessV2();
}
ChromelessWindow = function ()
{
        this.path = null;
		this.visus = null;
		this.URL = null;
        this.title = null;
        this.titleFont = null;
        this.titleSize = 0;
        this.titleColor = null;
        this.titlebarImage = null;
        this.titlebarHeight = 0;
        this.scrollbars = null;
        this.w = 0;
        this.h = 0;
        this.centered = null;
        this.xPos = 0;
        this.yPos = 0;
        this.borderColor = null;
        this.borderSize = 0;
        this.closeBottom = null;
        this.minimizeBottom = null;
        this.name = null;

        this.chromelessCompatible = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4 ? true:false;
        this.titlebarContent = null;
        this.chromelessWW = null;


}

ChromelessWindow.prototype.openChromelessV2 = function()
{
		this.runCode();

}

ChromelessWindow.prototype.closeChromeless = function()
{
        this.chromelessWW.close();
}

ChromelessWindow.prototype.setURL = function(newURL)
{
        this.URL = newURL;
        if(this.chromelessWW)
        {
                this.chromelessWW.execScript("b.all.canvas.URL='"+newURL+"'");
                this.chromelessWW.execScript("showChromeless()");
        }
}

ChromelessWindow.prototype.moveTo = function()
{
        this.xPos = arguments[0];
        this.yPos = arguments[1];
        if(this.chromelessWW)
        {
                this.chromelessWW.execScript('var cx='+this.xPos+';');
                this.chromelessWW.execScript('var cy='+this.yPos+';');
                this.chromelessWW.execScript("showChromeless()");
        }
}

ChromelessWindow.prototype.resizeTo = function()
{
        this.w = arguments[0];
        this.h = arguments[1];
        this.cH = (this.h-this.titlebarHeight)-this.borderSize;
        this.cW = this.w -(this.borderSize*2);
        if(this.chromelessWW)
        {
                this.chromelessWW.execScript('var cw='+this.w+';');
                this.chromelessWW.execScript('var ch='+this.h+';');
                this.chromelessWW.execScript("b.all.canvas.style.width='"+this.cW+"'");
                this.chromelessWW.execScript("b.all.canvas.style.height='"+this.cH+"'");
                this.chromelessWW.execScript("b.all.closeBottom.style.right='"+this.borderSize+"'");
                this.chromelessWW.execScript("b.all.minimizeBottom.style.right='"+(this.borderSize+20)+"'");
                this.chromelessWW.execScript("showChromeless()");
        }
}



ChromelessWindow.prototype.runCode = function()
{
        if(this.centered=="yes")
        {
                var tempX = this.w;
                var tempY = this.h;
                this.xPos = (screen.availWidth/2)-(tempX/2);
                this.yPos = (screen.availHeight/2)-(tempY/2);
        }
        if (this.chromelessCompatible)
        {
                this.chromelessWW = window.open("about:blank","","top=5000,left=5000,width=100,height=100,scrollbars="+this.scrollbars);
        }
        else
        {
                this.chromelessWW = window.open(this.URL, this.name, "top="+this.yPos+",left="+this.xPos+",width="+this.w+",height="+this.h+",toolbar=0,scrollbars="+this.scrollbars+",resizable=0");
        }
        this.cH = (this.h-this.titlebarHeight)-this.borderSize;
        this.cW = this.w -(this.borderSize*2);
        this.c = "<object type='text/html' border='0' style='position:absolute;z-index:2;top:"+this.titlebarHeight+"px;left:"+this.borderSize+"px;width:"+this.cW+"px;height:"+(this.cH-20)+"px;' data='"+this.URL+"' id='canvas'></object>";

        if((this.titlebarImage==undefined)||(this.titlebarImage==null)||(this.titlebarImage==""))
        {
                this.titlebarContent="";
                this.tb = false;
        }
        else
        {	//	var source = 
                this.titlebarContent="<img id='menu' unselectable='on' src='"+this.path+"../images/chromlessfr/"+this.visus+"' style='position:absolute;z-index:4; top:1px; left:1px; overflow: hidden;'>";
                this.tb = true;
        }//unselectable='on'                <div id='abdou'  style='font-family:Arial; font-size:11px;font-weight:bold;position:absolute;top:150px;left:10px;width:70%;height:15;cursor:default;font-family:"+this.titleFont+";font-size:"+this.titleSize+";color:"+this.titleColor+";z-index:0;background-color: #CC0000'>"+this.title+"</div>\

//				<div id='Layer2' style='position:absolute; left:0px; top:0px; width:100px; height:10px; background-color: #0000FF; layer-background-color: #0000FF; border: 1px none1 #FFFFFF;; z-index:4'></div>\

        this.menu = "\
				<div id='az3'  style='position:absolute;top:"+(this.cH+20)+"px;left:1px;width:"+this.cW+"px;height:20px;cursor:default;background-color:#FFFFFF;z-index:4'></div>\
				<div id='az2'  style='position:absolute;top:0px;left:0px;width:"+this.cW+"px;height:40px;cursor:default;background-color:#FFFFFF;z-index:3'>"+this.titlebarContent+"</div>\
				<div id='Title'  style='font-family:Arial; font-size:11px;font-weight:bold;position:absolute;top:0px;left:"+this.borderSize+"px;width:"+(this.cW)+"px;height:0;cursor:default;font-family:"+this.titleFont+";font-size:"+this.titleSize+";color:"+this.titleColor+";background-color:#FFFFFF;z-index:3'>"+this.title+"\
				</div>\
                <img id='closeBottom' onclick='top.close();' unselectable='on' src='"+this.path+"../images/chromlessfr/close_g1.gif' style='position:absolute; top:10px; right:"+(this.borderSize+10)+"px;z-index:5' alt='Close'>\
                <div id='fondo' style='position:absolute;top:40px; right:0px; width:100%; height:100%; background-color:#18486E;z-index:1'></div>\
				";

        if (this.chromelessCompatible)
        {
				this.chromelessWW.moveTo(300,-5000);
                this.chromelessWW.resizeTo(800,600);
                this.chromelessWW.document.writeln('<html>');
                this.chromelessWW.document.writeln('<head>');
                this.chromelessWW.document.writeln('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
                /*this.chromelessWW.document.writeln('<style>');
                this.chromelessWW.document.writeln('BODY{border:0px !important}');
                this.chromelessWW.document.writeln('</style>');*/
                this.chromelessWW.document.writeln('</head>');
                this.chromelessWW.document.writeln('<body>');
                this.chromelessWW.document.writeln('<script>');
                this.chromelessWW.document.writeln('var c=window.createPopup();');
                this.chromelessWW.document.writeln('var b=c.document.body;');
                this.chromelessWW.document.writeln("var ox=oy=ix=iy=0;");
                this.chromelessWW.document.writeln("var allContent =\""+this.menu+this.c+"\";");
                this.chromelessWW.document.writeln('b.innerHTML=allContent;');
                this.chromelessWW.document.writeln('var cx='+this.xPos+';');
                this.chromelessWW.document.writeln('var cy='+this.yPos+';');
                this.chromelessWW.document.writeln('var cw='+this.w+';');
                this.chromelessWW.document.writeln('var ch='+this.h+';');
                this.chromelessWW.document.writeln('function showChromeless(){');
                this.chromelessWW.document.writeln('c.show(cx,cy,cw,ch);focus()');
                this.chromelessWW.document.writeln('}');
                this.chromelessWW.document.writeln('var mm=false;');
                this.chromelessWW.document.writeln('var cmove=b.all("fondo");');
                this.chromelessWW.document.writeln('var cmoveAz=b.all("az2");');
                this.chromelessWW.document.writeln('var allb=b.all("allborders");');
                this.chromelessWW.document.writeln('var cmove2=(b.all("menu"))?b.all("menu"):"";');
                this.chromelessWW.document.writeln('var ctitle=b.all("Title");');
                this.chromelessWW.document.writeln('ctitle.style.visibility=('+this.tb+')?"hidden":"visible";');
                this.chromelessWW.document.writeln('var cclose=b.all("closeBottom");');
               // this.chromelessWW.document.writeln('cclose.onclick=function(){opener=self;self.close()};');
                //this.chromelessWW.document.writeln('function sadde(){alert("sadde");}');
				this.chromelessWW.document.writeln('var ox=oy=ix=iy=0;');
                this.chromelessWW.document.writeln('var m=0;');
                this.chromelessWW.document.writeln('ctitle.onmousedown=function(){m=1};');
                this.chromelessWW.document.writeln('ctitle.onmouseup=function(){m=0};');
                this.chromelessWW.document.writeln('cmove.onmousedown=function(){m=1};');
                this.chromelessWW.document.writeln('cmove.onmouseup=function(){m=0};');
                this.chromelessWW.document.writeln('cmoveAz.onmousedown=function(){m=1};');
                this.chromelessWW.document.writeln('cmoveAz.onmouseup=function(){m=0};');
                this.chromelessWW.document.writeln('cmove2.onmousedown=function(){m=1};');
                this.chromelessWW.document.writeln('cmove2.onmouseup=function(){m=0};');
                this.chromelessWW.document.writeln('document.body.onclick=function(){ if (m) { focus();cx=ix+event.screenX-ox;cy=iy+event.screenY-oy;c.show(cx,cy,cw,ch) }else { ix=cx; iy=cy; ox=event.screenX; oy=event.screenY } };');
                this.chromelessWW.document.writeln('setInterval("document.body.click()",20);');
                this.chromelessWW.document.writeln('onfocus=function(){showChromeless();}');
                this.chromelessWW.document.writeln('</script>');
                this.chromelessWW.document.writeln('</body>');
                this.chromelessWW.document.writeln('</html>');
                this.chromelessWW.document.location.reload();
                this.chromelessWW.document.title = this.title;
                this.chromelessWW.execScript("focus();");
				tiw = this.chromelessWW ;
        }
        else
        {
                this.chromelessWW.document.title = this.title;
        }
}