﻿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 com_popwin(scriptName, winWidth, winHeight, winName, features) 
{
	var popwin;

	if (winWidth == null || winWidth == "")
		winWidth = "780";

	if (winHeight == null || winHeight == "")
		winHeight = "400";

	winWidth = winWidth;
	winHeight = winHeight;

	var posX = Math.floor((screen.availWidth - winWidth)/2);
	var posY = Math.floor((screen.availHeight - winHeight)/2) - 40;

	if (posX < 10)
		posX = 0;
	if (posY < 10)
		posY = 0;

	var popupFeature = 'width=' + winWidth.toString()
						+ ',height=' + winHeight.toString()
						+ ',screenX=' + posX
						+ ',screenY=' + posY
						+ ',left=' + posX
						+ ',top=' + posY
						+ ',resizable=yes'
						+ ',scrollbars=yes';

	if (features != null && features != "")
		popupFeature = popupFeature + "," + features;

	popwin = window.open(scriptName, winName, popupFeature);

	if (popwin != null)
		popwin.focus();
	return;
}


