// JavaScript Document
//START
function pop_up(url,w,h) {
	if(w==null || w==0 || w==''){w='500'}
	if(h==null || h==0 || h==''){h='575'}
	var LeftPosition = (screen.width) ? (screen.width-w) / 2 : 100 ;
	var TopPosition = (screen.height) ? (screen.height-h) / 2 : 100 ;
	var settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=no,status=no,personalbar=no';
	newwindow = window.open(url,'pop',settings);
	newwindow.focus();
	//newwindow.resizeTo(w,h);
	return false;
}
//END
//START
function resize(w,h){
	if(w==null || w==0 || w==''){w='400'}
	if(h==null || h==0 || h==''){h='400'}
	window.resizeTo(w,h)
}
//END
//START
var win = null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){
		LeftPosition = (screen.width) ? Math.floor(Math.random()*(screen.height-w)) : 100 ;
		TopPosition = (screen.height) ? Math.floor(Math.random()*((screen.height-h)-75)) : 100 ;
	}
	if(pos=="center"){ 
		LeftPosition = (screen.width) ? (screen.width-w) / 2 : 100 ;
		TopPosition=(screen.height)?(screen.height-h) / 2 : 100 ;
	}else if((pos!="center"&&pos!="random")||pos==null){
		LeftPosition=0;
		TopPosition=20;
	}
	var settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no';
	win=window.open(mypage,myname,settings);
}
//END
