var popUpWin=0;
function popUpWindow(URLStr, strName, left, top, width, height) {
	if(popUpWin) {
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, strName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// Function for create and object from ID
function createObject(strID) {
	var obj1 = (document.getElementById) ? document.getElementById(strID) : eval("document.all[strID]");
	return obj1
}

function rollOver(strID,strSection) {
	MM_swapImage(strID,'','/images/nav1/' + strSection + '_on.gif',1);
}

/*******************************************************************************/
/*******************************************************************************/
// Author:		Carlos Saba
// Date:		24/10/2007
// Description:	Functions used to changed the styles of the secondary navigation.
// 				Secondary navigation consist of an A tag nested within a P tag.
// 				Each A and P tag requires a unique ID. The naming convention should be:
// 				A tag ID = XXXXX
// 				P tage ID = pXXXXX (prepend A tag ID with the letter p)
/*******************************************************************************/
/*******************************************************************************/
function secondaryRollOver(strID) {
	var obj1 = createObject(strID);
	var obj2 = createObject('p' + strID);
	obj1.className = 'navOn';
	obj2.className = 'navOn';
}

function removeStyle(strID,intIsLast) {
	var obj1 = createObject(strID);
	var obj2 = createObject('p' + strID);
	obj1.className = '';
	obj2.className = '';
	if (intIsLast == 1) obj2.className = 'last';
}

function letterRollOver(strID) {
	var obj1 = createObject(strID);
	var obj2 = createObject('p' + strID);
	obj1.className = 'on';
	obj2.className = 'on';
}

// function parameters are: field - the string field, count - the field for remaining
// characters  number and max - the maximum number of characters  
 function CountLeft(field, count, max) {
 // if the length of the string in the input field is greater than the max value, trim it 
 if (field.value.length > max)
 field.value = field.value.substring(0, max);
 else
 // calculate the remaining characters  
 count.value = max - field.value.length;
 }

