function checkLog() {
	// fishing for cookies
	var allcookies = document.cookie;
	var pos = allcookies.indexOf("user=");
		
	// check to see if we got cookies
		if (pos != -1) {
			// user is logged in
			//document.getElementById('loginsurround').style.visibility = 'hidden';
			document.getElementById('ulogin').style.visibility = 'hidden';
			//document.getElementById('logoutsurround').style.visibiliy = 'visible';
			document.getElementById('ulogout').style.visibiliy = 'visible';
		} else {
			// user is not logged in
			//document.getElementById('logoutsurround').style.visibility = 'hidden';
			document.getElementById('ulogout').style.visibility = 'hidden';
			//document.getElementById('loginsurround').style.visibility = 'visible';
			document.getElementById('ulogin').style.visibility = 'visible';
		}
}

function loginStatus() {
			var allcookies = document.cookie;
			var pos = allcookies.indexOf("user=");
			// check to see if we got cookies
			if (pos != -1) {
				// user is logged in
				document.getElementById('user_login').style.visibility = 'hidden';
				document.getElementById('my_vindy').style.visibility = 'visible';
			} else {
				// user is not logged in
				document.getElementById('user_login').style.visibility = 'visible';
				document.getElementById('my_vindy').style.visibility = 'hidden';
			}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function openWindow(url, name, width, height, features) {
	var top, left;
	var s;
	width = (typeof(width) == 'undefined') ? 300 : width;
	height = (typeof(height) == 'undefined') ? 500 : height;
	left = (screen.width) ? ((screen.width / 2) - (width / 2)) : 0;
	top = (screen.height) ? ((screen.height / 2) - (height / 2)) : 0;
	s = "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top;
	window.open(url, name, s, features);
}
