var isIE = false;
var isNN = false;

if (navigator.appName=="Netscape")
{ 
	isNN = true;
}
else 
{ 
	if (navigator.appName=="Microsoft Internet Explorer")
	{
		isIE = true;
	}
}


function SelectListItem(element)
{
	if (isIE)
	{
		parentNode = element.parentElement
		nodes = parentNode.children
	}
	else
	{
		parentNode = element.parentNode
		nodes = parentNode.childNodes
	}
	
	for (a=0;a<nodes.length;a++)
	{
		rep = ""
		try
		{
			rep = nodes[a].getAttribute("pf_replicate").toLowerCase();
		}catch(e){v=1}
	    if (rep == "true")
	    {
			nodes[a].setAttribute("class","ListItemNotSelected")
			nodes[a].setAttribute("className","ListItemNotSelected")
		}
	}
	element.setAttribute("className","ListItemSelected")
	element.setAttribute("class","ListItemSelected")
	
	
	document.getElementById(parentNode.id + "_selected").value = element.id.split("_")[element.id.split("_").length-1];
}

var __pfSubmitting = false;
function __pfPostBack(eventTarget,dontSubmit)
{
	document.getElementById("__EVENTTARGET").value = eventTarget;
	
	if (dontSubmit != true)
	{
		if (!__pfSubmitting)
		{
			__pfSubmitting = true;
			document.forms[0].submit()
		}
	}
}

function deleteCookie( name, path, domain ) {
  if ( getCookie( name ) ) document.cookie = name + "=" +
    ( ( path ) ? ";path=" + path : "") +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function addLoadEvent(func)
{

	var oldonload = window.onload;
	
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}