function PAGEPOPUP(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=950,height=600');");
}

function DEMOPOPUP(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=780,height=500');");
}

function MAILPOPUP(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'status=0,toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=890,height=750');");
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=320');");
}

function infopopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=450,height=340');");
}

function make_includes( sb )
{
  sb.value = sb.value.replace( /\s*,\s*/g, '|' );
}
function SmallpopUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=600');");
}
function TaskpopUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=650');");
}

//function submit_search( evt, tb )
//{
// if( evt.keyCode == 13 )
// {
//	window.location="http://www.etelos.com/store/search_results.espx?storetab=on&searchval="+tb;
// }
//  evt.cancelBubble = true;
//}

function screenpop(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=450,height=350');");
}

function printpage()
{
window.print()
}

function checkMaxLength(cthis) 
{
	var maxLength = cthis.getAttribute('maxlength');
	var curvalue = cthis.value
	var currentLength = curvalue.length;
	if (currentLength > maxLength)
	{
		alert("Input exceeds allowed length.");
		var newval = curvalue.substring(0, maxLength);
		cthis.value = newval;
	}
}