
/***********************************************************
 * Cookies helper methods                                  *
 ***********************************************************/

/*function getCookie(name)
{
	// cookies are separated by semicolons
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
		// a name/value pair (a crumb) is separated by an equal sign
		var aCrumb = aCookie[i].split("=");
		if (name == aCrumb[0]) 
			return unescape(aCrumb[1]);
	}

	// a cookie with the requested name does not exist
	return null;
}*/

function setCookie(name, value)
{
	alert("setCookie - start");
	document.cookie = name + "=" + escape(value) + ";";
}



/***********************************************************
 * Disabling right click menu                              *
 ***********************************************************/

if (window.Event)
	  document.captureEvents(Event.MOUSEUP);

document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;

function nocontextmenu() {
	  event.cancelBubble = true, 
	  event.returnValue = false;
	  return false;
} 
	
function norightclick(e) {
	  if (window.Event) {
	    if (e.which == 2 || e.which == 3) 
			return false;
	  }
	  else {
		if (event.button == 2 || event.button == 3) {
			event.cancelBubble = true, event.returnValue = false;
			return false;
		}
	}
}

/***********************************************************
 * Disabling the select text                               *
 ***********************************************************/

function disableselect(e){
	return false;
}

function reEnable(){
	return true;
}

// diable the select on all pages - except Contact US
if (activeMenu != 3 && activeMenu != 4)
{
	//if IE4+
	document.onselectstart=new Function ("return false");

	//if NS6
	if (window.sidebar)
	{
		document.onmousedown=disableselect;
		document.onclick=reEnable;
	}
}

