var werd; 

function openopen(linkk,name,w_,h_){
	linkk='/popwin.php?link='+linkk+'&dir='+name;
	var up_=100;
	var left_=100;
	param = 'top='+up_+',left='+left_+',width='+w_+',height='+h_;
	if (werd==null||werd.closed){
		werd=window.open(linkk,name, param+',status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no');
	}
	else{
		werd.close();
		werd=window.open(linkk,name, param+',status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no');
	}
	werd.focus();
}
function open_win(links,name){
	un_window=window.open('http://'+links,name);
	un_window.focus();
}
var nam;
function dok0(url,h,w){
	if (nam!=null && !nam.closed)nam.close();
	tops(h,w);
	nam=window.open(url,null,"height="+h+",width="+w+",status=no,toolbar=no,menubar=no,location=no,top="+top_+",left="+left_+",scrollbars=no,resizable=yes");
	nam.focus();
}
function tops(h,w){
	if (navigator.appName == "Netscape") {
		top_=window.innerHeight/2-h/2;
		left_=window.innerWidth/2-w/2;
	}
	else {
		top_=document.body.clientHeight/2-h/2;
		left_=document.body.clientWidth/2-w/2;
	}
}
function get_cur_date(b){
	a=new Date();
	year=a.getYear();
	if(year<2000)year+=1900;
	if((a.getMonth()+1+b)>12)return "01/01/"+(year+1);
	return "01/"+(a.getMonth()+1+b)+"/"+year;
}
function get_cur_date_year(b){
	a=new Date();
	year=a.getYear();
	if(year<2000)year+=1900;
	return (year-b)+"-01-01";
}