if(self!=top)
{
	if(document.images)top.location.replace(document.location.href);
	else top.location.href=document.location.href;
}

function popupWin(winWidth, winHeight, title, scrollbars, resizable)
{
	var xPos=(screen.availWidth/2)-((winWidth/2)+10);
	var yPos=(screen.availHeight/2)-((winHeight/2)-10);

	if(xPos<0)xPos=1;
	if(yPos<0)yPos=1;
	if(scrollbars)scrollbars="yes"; else scrollbars="no";
	if(resizable)resizable="yes"; else resizable="no";
	var s=",top="+yPos+",left="+xPos+",width="+winWidth+",height="+winHeight+",scrollbars="+scrollbars+",resizable="+resizable;
	var win=window.open(title+'.php',title,"toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no"+s);
	win.focus();
	
	return false;
}

Array.prototype.inArray=function(value)
{
	for(var i=0; i<this.length; i++)if(this[i]===value)return true;
	return false;
}

function limit_opt(opt)
{
	for(i=0;i<num_options;i++)
	{
		curr_opt=document.getElementById('Statement'+String.fromCharCode(65+i));
		if(opt.selectedIndex==curr_opt.options.selectedIndex && curr_opt.id!=opt.id)curr_opt.selectedIndex=0;
	}
}