// --- check if frames are valid  --- 
function checkFrames(){
	var arguments = checkFrames.arguments;
	var host = "http://" + window.location.host;
	var sideUrl = '';
	var url = document.URL.substring(host.length + 1, document.URL.length);
	url = escape(url);
	if (arguments.length > 0) url = (arguments[0] != '') ? arguments[0] : url;
	if (arguments.length > 1) sideUrl = (arguments[1] != '') ? '&sfID=' + escape(arguments[1]) : '';
	if (top.frames.length < 2) {
		location.replace(host + '/index.asp?mfID=' + url + sideUrl);
	}
}

function openImage(img) {
	var theImg = new Image();
	theImg.src = img;
	var w = theImg.width ? theImg.width : 800;
	var h = theImg.height ? theImg.height : 550;
	var posX = (screen.width - w) / 2;
	var posY = (screen.height - h) / 2;
	var theWin = window.open("","theWin","width="+w+",height="+h+",left="+posX+",top="+posY);
	theWin.document.open();
	theWin.document.write('<html><title>Detail</title><body style="margin:0;background:#fff;" onblur="self.close();">'); 
	theWin.document.write('<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"><tr><td align="center"><a href="javascript:;" onclick="self.close();"><img src="'+img+'" alt="" border="0" /></a></td></tr></table>'); 
	theWin.document.write('</body></html>');
	theWin.document.close();
	theWin.focus();
}
