var selObj;


function expand(obj)
{
	selectStyle();
	try {
		var a;
		a=document.getElementById(obj.id + "HD"); //eval(obj.id + "HD");
		if (a.style.display=="none")
			a.style.display="inline";
		else
			a.style.display="none";
		}
	catch(e) {}
}

function selectStyle()
{
	try {
		selObj.style.color = "#0000aa";
		selObj.style.textDecoration = "none";
		}
	catch (e) {}
	try {
		selObj = document.getElementById(event.srcElement.id);
		selObj.style.color = "#8e00aa";
		selObj.style.textDecoration = "underline";
		}
	catch (e) {}
}

function openText(id)
{
	selectStyle();
	WebForm_DoCallback('__PAGE', id, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function openResults(obj,id)
{
	selectStyle();
	var s = obj.id;
	if (s.indexOf("IntLMenu")==0) 
		window.open("gResults.aspx?id=" + id);
	else
		WebForm_DoCallback('__PAGE', id, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function openReserved(id, type, fn)
{
	selectStyle();
	showModalDialog('frameDialog.aspx?Page=ReservedDocument.aspx?id=' + id + '&t=' + type + '&fn=' + fn, '', 'dialogHeight:670px;dialogWidth:500px;status:no;resizable:no;');
}

function openEvents(obj,id)
{
	selectStyle();
	var s = obj.id;
	if (s.indexOf("IntLMenu")==0) 
		window.open("gEvents.aspx?id=" + id);
	else
		WebForm_DoCallback('__PAGE', id, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function openLogin(id)
{
	selectStyle();
	WebForm_DoCallback('__PAGE', id, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function openSubText(id)
{
	WebForm_DoCallback('__PAGE', id + '||0', ClientSideCallBack, null, ClientSideCallBackError, false);
}

function openPartner(id,idParnter)
{
	selectStyle();
	WebForm_DoCallback('__PAGE', id + '||' + idParnter, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function settaFrame()
{
}

function impostaFocus(obj)
{
	try {
		obj.focus();
	} catch(e){}
}

function AgreeClick()
{
	document.all.btSend.disabled = ! document.all.chkAgree.checked;
}

function ClientSideCallBack(responseText, context) {
	//alert(navigator.appVersion);
	//document.getElementById("interno").innerHTML="";
	if (responseText != null && responseText != "" && responseText != "STOP REFRESH") {
		document.getElementById("interno").innerHTML=responseText;
		//document.getElementById("interno").style.height="350px";
		//alert(document.getElementById("interno").style.height);
	}
}

function ClientSideCallBackError(responseText, context) {
		alert(responseText);
}

function SubmitLogin()
{
	WebForm_DoCallback('__PAGE', '-99||' + 0 + '||' + document.getElementById("txtUserName").value + '||' + document.getElementById("txtPassword").value, ClientSideCallBack, null, ClientSideCallBackError, false);
}

function LogOut()
{
	WebForm_DoCallback('__PAGE', '-98', ClientSideCallBack, null, ClientSideCallBackError, false);
}