// display decision alert box

function decision(message, url){
	if(confirm(message)) location.href = url;
}

// open browser window
function openPopUp(url, windowName, w, h, scrollbar) {

           var winl = (screen.width - w) / 2;
           var wint = (screen.height - h) / 2;
           winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollbar ;
		   win = window.open(url, windowName, winprops);
           if (parseInt(navigator.appVersion) >= 4) { 
              	win.window.focus(); 
           } 
}

function jumpMenu(target,object,restore){ 
  eval(target+".location='"+object.options[object.selectedIndex].value+"'");
  if (restore) object.selectedIndex=0;
}

function 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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function getImage(imageName)
{
		findObj('img').src = imageName;
}

function submitDoc(formName) { 
  var obj;
 
	if (obj=findObj(formName)!=null) 
	{
		findObj(formName).submit(); 
	}
	else 
	{
		alert('The form you are attempting to submit called \'' + formName + '\' couldn\'t be found. Please make sure the submitDoc function has the correct id and name.');
	}

}

function quest_edit(evt,d,r) {
	if(document.all[d].style.display=='block'){

	document.all[d].style.display='none';
	document.all[r].style.display='block';
	} 
	else{
	document.all[d].style.display='block';	
	document.all[r].style.display='none';	
	}
	}
function scr() {
width = screen.width;
if(width <= 1024) {document.all['td2'].style.display='none';}
if(width > 1280) {
document.all['tb1'].style.width=1250;
document.all['tb2'].style.width=1250;
}
}

function rsz() {
width = window.innerWidth;
if(width <= 980) {
	document.all['tb1'].style.width=980;
    document.all['tb2'].style.width=980;}
}

function opwindow(x){
if(x==1){window.open('skins/Classic/styleImages/academ.htm','','width=749,height=504');}
if(x==2){window.open('skins/Classic/styleImages/bauman.htm','','height=500,width=778');}
}

var isNN = (navigator.appName == "Netscape" || navigator.appName == "Opera");
var isIE = (navigator.appName == "Microsoft Internet Explorer");

function clk(evt,x){
x=String('index.php?act=viewDoc&docId='+x+'');
	if (isIE) {event.srcElement.href=x; event.cunselBubble=true;}
	if (isNN) {evt.target.href=x; evt.cunselBubble=true;}
}

function set() {
	x=document.all.gg.style.visibility;
	if(x=='visible'){document.all.gg.style.visibility="hidden";}
	if(x=='hidden'){document.all.gg.style.visibility="visible";}
	setTimeout('set()',500);
}