function popup(path,w,h) {
	var top = parseInt((window.screen.height - h) / 2);
	var left = parseInt((window.screen.width - w) / 2);
	
	self.open(path,'popup','top='+top+',left='+left+',toobar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,copyhistory=no,width='+w+',height='+h);	
}

function popupPro(path,w,h,title) {
	var top = parseInt((window.screen.height - h) / 2);
	var left = parseInt((window.screen.width - w) / 2);
	var aNoteWin;
	aPopUp= window.open('','message','top='+top+',left='+left+',toobar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=no,copyhistory=no,width='+w+',height='+h);
    ndoc= aPopUp.document;
    astr ='<HTML><HEAD><TITLE>'+title+'</TITLE></HEAD>';    
    astr +='<BODY STYLE="margin:0; padding:0;" onLoad="focus()">';	
	astr += '<A HREF="#" onClick="self.close(); return false;"><IMG SRC="'+path+'" WIDTH="'+w+'" HEIGHT="'+h+'" BORDER="0" /></A>';
    astr +='</BODY></HTML>';
    ndoc.write(astr);
    ndoc.close();
    self.aNoteWin = aPopUp;
}

function scollIntoRow() {	
	try {
		var t = document.getElementById('sDiv').getElementsByTagName('TABLE')[0];	
	} catch(e) {
		return false;
	}
	var scrollT = 0;
	for(var i = 0; i < times.length - 1; i++) {
		if(times[i] <= timeC && times[i + 1] > timeC) {
			break;
		}
	}		
	try {
		for(var j = 0; j < t.tBodies[0].rows.length, j < i; j++ ) {
			scrollT += parseInt(t.tBodies[0].rows[j].offsetHeight);
		}				
	} catch(e) {}
		
	document.getElementById('sDiv').scrollTop = scrollT;	
}
