function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function DaWindowzOpen(theUrl,WinName,width,height,scrollbar) {
// theUrl 	= The page
// width	= Width of the window
// height	= Height of the windows
// scroll	= Do You want the Scroll??? ][ Value = yes|no
//
// brought to you by []==ThoRŪ
//
	var x = screen.availWidth
	var y = screen.availHeight
	var spaceSx = (x - width)/2
	//var spaceUp = 0						// To Point PopUp top
	var spaceUp = (y - height)/2					// To point PopUp in the center

	winparams	= ""						// Start Params for Window
	winparams	= winparams + "scrollbars=" + scrollbar		// Scroll
	winparams 	= winparams + ",resizable=no"			// Resizable
	winparams 	= winparams + ",left=" + spaceSx		// Space From Left
	winparams 	= winparams + ",top=" + spaceUp			// Space From Top
	winparams 	= winparams + ",width=" + width			// Windowz Width
	winparams 	= winparams + ",height=" + height		// Windowz Height
	winparams 	= winparams + ",directory=no"			// The Tool Bars Menu
	winparams 	= winparams + ",status=no"			//
	winparams 	= winparams + ",location=no"			//
	winparams 	= winparams + ",toolbar=no"			// -------------------

	theNavigator	= navigator.userAgent.toLowerCase();
	//	Check if the window is already open
	/*
	if (window.ThoR) {
		if (	(theNavigator.indexOf("msie") > -1)	&& (theNavigator.indexOf("win") > -1)	)	{
			//	Close it if browser is IE and SysOp is Win
			ThoR.close();
		} else {
			//	If Mac, then resize only the window
			ThoR.resizeTo(width,height);
		}
		//	Ok, now open the new window
		ThoR	= window.open(theUrl,WinName,winparams);
	} else {
		//	No window
		ThoR	= window.open(theUrl,WinName,winparams);
	}
	*/
	ThoR	= window.open(theUrl,WinName,winparams);
	ThoR.focus();
}

/*function viewImage (img,width,height) {
	var w;
  img = img.src ? img.src : img;
  if (w && !w.closed)
    w.close();
  w = open ('gallery.asp', 'imageView', 
       'menubar=0,locationbar=0,statusbar=0,resizable=0'
       + ',scrollbars=0,width=' + width + ',height=' + height + '');
  var html = '';
  html += '<HTML><head><title>:: SVAT ::</title></head><BODY bgcolor="#DBF5B6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">';
  html += '<IMG SRC="' + img + '">';
  html += '</BODY></HTML>';
  w.document.open();
  w.document.write(html);
}*/


