document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}



function hidestatus()
	{ window.status='Stitch Whispers'
		return true
}

if (document.layers)
	document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.CLICK)
    document.onmouseover=hidestatus
    document.onmouseout=hidestatus
    document.onclick=hidestatus


// Open a non-resizable popup window with no menu bar
function openWindow(winWidth, winHeight, page, winName){
	var windowprops = "width=" + winWidth + ",height=" + winHeight + ",left=1,top=1,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no";
	window.open(page, winName, windowprops);
}

// Get display space within a browser
 function getBrowserWidth(){
	  var ns = (!document.all && document.getElementById);
	  var ie4 = (document.all);
	  var browserWidth = 0;
 
	  if (ns){
	   browserWidth = window.innerWidth;
	  } 
	  if (ie4){
	   browserWidth = document.body.clientWidth;
	  }
 
	  return browserWidth;
 }
 
 // Get a starting position for a layear image
 function getLeftPos(pageWidth, mergin){
   
	var leftPos = 0;
	var browserWidth = getBrowserWidth();
 
	  // Get left position
	  if (browserWidth > pageWidth){
		 leftPos = (browserWidth - pageWidth) / 2 + mergin;
	  } else {
		 leftPos = mergin;
	  }
 
	return leftPos;
 }

// Display message page 
function displayMessage(ID){
	url = "header.php?page=Msg&ID=" + ID;
	document.forms[0].action = url;
	document.forms[0].submit();
}