

//- Custom Scripts -//

function ow(w, h, url) {
	l = Math.round( (screen.width/2) - (w/2) );
	t = Math.round( (screen.height/2) - (h/2) );
	window.open( url ,'nxwindow'
			   , 'width='+w+',height='+h+',top='+t+',left='+l
				 + ',directories=no,location=no,menubar=no'
				 + ',resizable=yes,scrollbars=no,status=no,toolbar=no');
}

function slideshow(id, slide) {

	if(!slide) {
        slide = 0;
    }
    
    var url = "../main/show_slideshow.php?slideshow_id=" + id + "&slide=" + slide;

	ow( 570, 580, url );
	
}


if(window != top) {
    window.alert = function() {}
    var referer = document.referrer;
    if(referer.indexOf('/admin/') != -1) {
        top.location = '/admin/';
    }
}