//var SERVER_PREFIX="http://ps-nature.com/";
var SERVER_PREFIX="/";

function openwin(url,target,width,height){
	window.open(url,target,"width=" + width + ",height=" + height + ",scrollbars=yes");
}
function showGallery(tgt){
	var details = "";
	details = "status=no,toolbar=no,scrollbars=yes,resizable=no,";
	bounds = 'top=0,left=0,width=' + (screen.width-10) + ',height=' + (screen.height-70);
	var w = window.open(SERVER_PREFIX + 'gallery/gallery.php?tgt='+tgt,'PhotoGallery',details + bounds );
	w.focus();
}
/*
function jumpGallery(category,gallery){
	var details = "";
	if( screen.height >= 768){
		details = "status=no,toolbar=no,scrollbars=yes,resizable=no,";
	}else{
		details = "status=no,toolbar=no,scrollbars=yes,resizable=yes,";
	}
	bounds = 'top=0,left=0,width=' + (screen.width-10) + ',height=' + (screen.height-70);
	var w = window.open(SERVER_PREFIX + 'gallery/jumpGallery.php?category=' + category + '&gallery=' + gallery ,'PhotoGallery',details + bounds );
	w.focus();
}
*/
function jumpGallerySubMenu(category){
	var details = "";
	details = "status=no,toolbar=no,scrollbars=yes,resizable=no,";
	bounds = 'top=0,left=0,width=' + (screen.width-10) + ',height=' + (screen.height-70);
	var w = window.open(SERVER_PREFIX + 'gallery/jumpGallery.php?category=' + category,'PhotoGallery',details + bounds );
	w.focus();
}
function downloadWallpaper(name){
	if( screen.width >= 1024 ){
		name += "_l.jpg";
	}else{
		name += "_s.jpg";
	}
	var url = "cgi-bin/dlwallpaper.php?image=wallpaper/" + name;
	var w = window.open(SERVER_PREFIX + url,"_blank","");
	w.focus();
}
