

/* sniffer */

var isIE    = (document.all) ? 1 : 0;
var isNS    = (document.layers) ? 1 : 0;
var isMoz   = (document.getElementById) ? 1 : 0;
var isDHTML = (isIE || isMoz) ? 1 : 0;
var isMac   = (/Mac/i.test(navigator.userAgent.toString())) ? 1 : 0;


/* write CSS */

if (isNS) {
	document.writeln("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"/css/liveedge_ns.css\">");
} else {
	document.writeln("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"/css/liveedge.css\">");
}


/* popup function */

function openPopUp(URL,winName,features) {
    window.open(URL,winName,features);
}

function popWinOpen(width,height,url,name,resize,scroll) {
	if (screen) {
		var window_width  = width;
		var window_height = height;
		if (screen.height < 700) { 
			var window_top  = 0;
			var window_left = (screen.width-window_width) / 2;
		} else { 
			var window_top  = (screen.height-window_height) / 2;
			var window_left = (screen.width-window_width) / 2;
		}
		popWindow = window.open(url,name,'resizable=' + resize + ',menubar=0,scrollbars=' + scroll + ',width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');
		popWindow.focus();
	} else {
		window.open(url,name,'resizable=' + resize + ',menubar=0,scrollbars=' + scroll + ',width=300,height=120,top=0,left=0');
	}
}

//<A HREF="javascript: popWinOpen(600,560,'/path/file.ext','myWin',0,0)">Linktext</A>


function changeMonth() {
	var f = document.forms.diaryForm;
	if (f) {
		if (f.meta_id.selectedIndex > 0) f.submit();
	}
}

