if(document.all && !document.getElementById) { document.getElementById = function(id) { return document.all[id]; }} var preloaded = false; var strNav = navigator.userAgent.toLowerCase();
var isCE = strNav.indexOf("windows ce") + strNav.indexOf("wince"); var isPalm = strNav.indexOf("palm"); var isPDA = strNav.indexOf("240x") + strNav.indexOf("320x");; if (isPDA > -1 || isCE > -1 || isPalm > -1) isPDA = 1; else isPDA = 0;
if(isPDA) {
	document.write('<link rel="stylesheet" type="text/css" href="css/handheld.css" media="screen,handheld" />'); } else {
	preload();
	document.write('<link rel="stylesheet" type="text/css" href="css/styles.css" media="screen" />'); } function newimg(x) {
	if (document.images) {
		i = new Image();
		i.src = x;
		return i;
	}
}
function navswap(nav,newnav) {
	if (preloaded == true) {
		document.getElementById('nav-'+nav).src = newnav;
	}
}
function preload() {
	if (document.images) {
		btnHome_Over = newimg("images/toolbar/btnHome_Over.gif");
		btnCaptions_Over = newimg("images/toolbar/btnCaptions_Over.gif");
		btnMoblogs_Over = newimg("images/toolbar/btnMoblogs_Over.gif");
		btnForum_Over = newimg("images/toolbar/btnForum_Over.gif");
		btnNewsArchive_Over = newimg("images/toolbar/btnNewsArchive_Over.gif");
		preloaded = true;
	}
}

function Demopop(mypage, myname, w, h, scroll) {
	var winl = 20;
	var wint = 20;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	self.name="NewWindow";
}

function openWindow(url, name, options, noMargins)
{
	var newWin;
	newWin = window.open(url, name, options);
/*
	if (noMargins)
	{
		alert(newWin);
		alert(newWin.document);
	}
	else
		alert('yes');
*/
}

function openImageWindow(url, name, options, noMargins)
{
	// Create the default HTML content for the popup window
	var popupContent = "\n<html><head><title>Derezzed.com - Image Viewer</title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>";
	popupContent += "\n<body style='margin: 0px; padding: 0px;'>";  // Need to make sure the <body> has no padding or margin or the image will be off-kilter
	popupContent += "\n<div align='center'>";
	popupContent += "<img id='popupimage' src='" + url + "'>";  // This is the <img> that we replace the src, width & height (see below)
	popupContent += "</div>";
	popupContent += "\n</body>";
	popupContent += "\n</html>";
	
	var popupWindow = window.open('', name, options);
	// Set the window opener
	if (popupWindow.opener == null)
		popupWindow.opener = self;
	popupWindow.focus();

	popupWindow.document.write(popupContent);
	popupWindow.document.close();
}

function openMessageWindow(Name, User_ID)
{
	var MessageWin;
	MessageWin = window.open('f_message.aspx?user_id=' + User_ID, Name, 'height=300,width=500,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,margin=0');
}

