function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function MM_findObj(n, d) {
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 getRequestedImage() {
	var queryStr = window.location.search.substring(1);
	var vars = queryStr.split("&");
	for (var i = 0; i < vars.length; i++) {
		var pair = vars[i].split("=");
		if (pair[0] = "img")
			return pair[1];
	}
	return "";
}

function getImage() {
	img = MM_findObj("image");
	if (!img)
		return;
		
	var imgFile = getRequestedImage();
	if (imgFile == "") {
		img.src = "images/noimage.gif";
		return;	
	}
	if (imgFile.indexOf("/") != -1) {
		img.src = "images/noimage.gif";
		return;
	}
	var parts = imgFile.split(".");
	if (parts[1] != "gif" && parts[1] != "jpg") {
		img.src = "images/noimage.gif";
		return;
	}

	img.src = "images/" + imgFile;
	
	window.focus();
}