function wOpen(pURL, pName, w, h, scroll, text, specialSettings){
	xLeft=(screen.width)?(screen.width-w)/2:0;
	xTop=(screen.height)?(screen.height-h)/2:0;
	xSettings = 'height='+h+',width='+w+',top='+xTop+',left='+xLeft+',scrollbars='+scroll+specialSettings
	hwnd = window.open(pURL,pName,xSettings);
	if(hwnd.window.focus){hwnd.window.focus();}
	if(text != "") hwnd.document.write(text);
	hwnd.document.close();
	return hwnd;
}

var autoSwapping = true;
function swpImg(val, auto){
	if (auto){
		for (j=0; j < imgCount; j++){
 			if (!images[j].complete) return;
		}
	}
	if (!auto && autoSwapping) autoSwapping = false;
	imgNow+=val;
        if (imgNow == imgCount) imgNow = 0; 
        	else if (imgNow < 0) imgNow = imgCount-1;
        var mfIe = false;
        if( document.all) {
        mfIe = true;
        }
        if( mfIe) {
          document.all.screen.innerHTML = "<table border=0 align='right' cellpadding='0' cellspacing='0'><tr><td width='320' background='"+images[imgNow].src+"'><img src='images/marco.gif' width='320' height='240' alt='"+images[imgNow].alt+"'></td></tr></table>";
		  document.all.screen.refresh;
        }
        else {
          document.layers["screen"].document.open();
          document.layers["screen"].document.write("<table border=0 align='right' cellpadding='0' cellspacing='0'><tr><td width='320' background='"+images[imgNow].src+"'><img src='images/marco.gif' width='320' height='240' alt='"+images[imgNow].alt+"'></td></tr></table>");
          document.layers["screen"].document.close();
}
}

function autoSwap(){
	if(autoSwapping){
		swpImg(1, true);
		setTimeout("autoSwap()", 2000);
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

