var ie = false;
var nn = false;
if(document.all){
	ie=true;
}else{
	nn = true;
}





function PopUp(theURL,winName,features) {

	window.open(theURL,winName,features);
}

function ToggleItem(myItem) {
	if (myItem.style.visibility != 'hidden') {
		HideItem(myItem);
	} else {
		ShowItem(myItem);
	}
	return false;
}
function ShowItem(myItem) {
	myItem.style.visibility = 'visible';
	myItem.style.display = '';
}
function HideItem(myItem) {
	myItem.style.visibility = 'hidden';
	myItem.style.display = 'none';
}



//Pindar SG:  3/8/09 Added to allow for focus on form fields
// to display messages
function displaytext(frmElem, strText){
	var top, width
	var availWidth, availHeight, availOffset
	frmElem.style.position = 'relative'; //This is fix for IE to allow offsetTop to work correctly
	
	 var hr = document.getElementById('helpBox')
	 if(hr==null){return false;}
	 hr.style.top = (frmElem.offsetTop)+'px';
	 hr.style.left = (frmElem.offsetLeft+frmElem.clientWidth+10)+'px';
	 hr.style.visibility = 'visible';
	 var hintPointer = "<span class=\"hint-pointer\">&nbsp;</span>";
	 hr.innerHTML = strText+hintPointer;
	 return true;
}
//Pindar SG:  3/8/09
//onblur events for form help messages use this to hide the message
function nd(){
	 var hr = document.getElementById('helpBox')
	 hr.style.visibility = 'hidden'
} 

//'#### PINDAR : KW : Read Cookie Script

function readCookie(name)
{
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i<ca.length;i++)
    {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
} 

//'#### PINDAR : KW : Create Cookie Script

function createCookie(name,value,days)
{
    if (days)
    {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    var ck = name+"="+value+expires+"; path=/";
   //if (days != -1) alert('Cookie\n' + ck + '\ncreated');
    document.cookie = ck;
}

