function needSignin() {
alert("You need to sign-in to access this feature.");
if (document.signinFrm && document.signinFrm.email) {
	document.signinFrm.email.focus();
}
}

function formFocus(engineName,val,value) {
var cookieStr = document.cookie;
if (cookieStr.indexOf(CG=142) == -1 && cookieStr.indexOf(CG=169) == -1){
	var newtabs = false;
	if (!newtabs) {
		var fo = document.forms[engineName].Keywords;
		if (value != 0) {
			fo.disabled = false;
			fo.focus();
			fo.value = val;
			fo.select();
		} else {
			fo.disabled = '';
			fo.value = '';
		}
	}
}
}

function mobilePopupPSP7() {
window.open('/html/1_mobile_popup.html','mobileEditPopup_2PSP7','width=390,height=272');return false;
}

function lzWriteElement(name, attrs, closep, escapeme) {
var lt = escapeme ? '&lt;' : '<';
var o = lt + name;
for (var p in attrs)
	o += ' ' + p + '="' + attrs[p] + '"';
if (closep)
	o += '/';
o += '>';
return o;
}

function containskey (arr, key) {
return (arr[key] != null);
}

function lzUpdate(a, b) {
for (var p in a)
	if (containskey(b,p)) {
		a[p] = b[p];
	}
}

function lzEmbed(properties, escapeme)
{
var url = properties.url;
var width = properties.width;
var height = properties.height;
var o = '';
var lt = escapeme ? '&lt;' : '<';

objectAttributes = {
	classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
	type: 'application/x-shockwave-flash',
	width: 0, height: 0
};

lzUpdate(objectAttributes, properties);
objectParams = {
	movie: url,
	scale: 'exactfit',
	salign: 'lt',
	// The properties parameter should override these.
	width: 0, height: 0, bgcolor: 0};
lzUpdate(objectParams, properties);
embedAttributes = {
	type: 'application/x-shockwave-flash',
	pluginspage: "http://www.macromedia.com/go/getflashplayer",
	scale: 'exactfit',
	src: url,
	quality: 'high',
	salign: 'lt',
	// The properties parameter should override these.
	width: 0, height: 0, bgcolor: 0};
lzUpdate(embedAttributes, properties);

var ns = (document.layers)? true:false;
var ie = (document.all)? true:false;

var win = navigator.appVersion.indexOf('Win') != -1;
if (win)
	objectAttributes.codebase =  "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0";

if (navigator.appVersion.indexOf("Macintosh")!=-1) {
	objectAttributes['data'] = url;
}

if  (ns) {
	o = lzWriteElement('embed', embedAttributes, true, escapeme);
} else {
	o = lzWriteElement('object', objectAttributes, false, escapeme);
	for (var p in objectParams)
	o += lt + 'param name="' +
			 p + '" value="' +
			 objectParams[p] + '" />\n';
	o += lzWriteElement('embed', embedAttributes, true, escapeme);
	o += lt + '/object>\n';
} 
//alert(o);
document.write(o);
return o;
}


function setBEAMCookie(expiresecs,eatit) {
thishost = self.location.hostname; thisdomain = thishost.substring(thishost.lastIndexOf(".",(thishost.length - 5)), thishost.length );
expires = new Date((new Date()).getTime() + ((expiresecs) * 1000));
cs = 'BEAMRUNNING=true';
cs += '; expires=' + (eatit?'Fri, 13-Apr-1970 00:00:00 GMT':expires.toGMTString());
cs += '; path=/';
cs += '; domain='+thisdomain+';';
document.cookie = cs;
}

function eatBEAMCookie() {
setBEAMCookie(0,true);
}

function loadEnhancedModule() {
eatBEAMCookie();
self.location.href="/?beamload=" + new Date().getTime();
}

function printThisPage() { 
  if(window.print){ window.print();
  } else {alert("Sorry, your browser does not support this link's functionality. Please select \"File -> Print\" from your browser's top menu.");} 
}

var today = new Date();
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var showtoday = months[today.getMonth()] + " " + today.getDate() + ", " + today.getFullYear();

function intTrim(intToTrimOut,formElement,fieldElement) {
  var theField=document.forms[formElement].elements[fieldElement].value;
  var intNowTrimmed="";
  for(i=0;i<theField.length;i++) {
   if (!isNaN(theField.charAt(i))) {
     if(theField.charAt(i)!=intToTrimOut && !isNaN(theField.charAt(i))) intNowTrimmed += theField.charAt(i); 
   } else {
     intNowTrimmed = theField;
   }
  }
  document.forms[formElement].elements[fieldElement].value=intNowTrimmed;
}