<!--
// This simulates the posts from a link when a user clicks on the
// link.  Need to ensure that the next page id is passed
//
//

function submitlink(formname, action) {
//	lock();
	eval("document."+formname + ".action").value = action;
	eval("document."+formname + ".submit()");
}

function submitlink(formname, action, portlet, syncMode) {

    eval("document."+formname + "." + portlet + "action").value=action;
    if( syncMode ) {
    	if( eval("document."+formname + ".originalAction") != null )
    		eval("document."+formname).action = eval("document."+formname).originalAction;
    }

	var paramstr = "&" + portlet + "action=" + action;
	var formaction = eval("document."+formname + ".action");
	var pos = formaction.indexOf("javascript:bea.wlp.disc.xie._Service.update");
		if (pos != -1){
			var pos1 = formaction.indexOf("\',");
			var mfrom = eval("document."+formname);
			mfrom.action = formaction.substring(0,pos1) + paramstr + formaction.substring(pos1);
		}

    eval("document."+formname + ".submit()");
}

function submitpage(formname) {
	eval(formname + ".submit()");
}

function lock() {
	document.body.style.cursor = 'wait';
}

function unlock(){
	document.body.style.cursor = 'default';
}

function setButtonEvent(formname, event) 
{
    document[getNetuiTagName(formname,this)][getNetuiTagName("buttonevent",this)].value = event;
    return true; 
}  

function setWebPointId(val) 
{

    if (null != document.getElementById("webPointId")) {
        document.getElementById("webPointId").value=val;
    }
   }
function setWebPointIdCust(val) 
{

    if (null != document.getElementById("webPointId")) {
        document.getElementById("webPointId").value=val;
    }
    submitlink('customizedReportForm','search','myBookPortlet_1');
   }
   
// function used for PM listing to hide pages

function showDiv(a,b) {
	for (i=0; i<b+1; i++) {
		if (document.getElementById(divArray[i])!=undefined){
			document.getElementById(divArray[i]).style.display="none";
		}
	}
	document.getElementById(a).style.display="block";
}

function showAllDivs(a, showAllText, showText, hideAllText, hideText) {
	if (document.getElementById("toggleAll").innerHTML == showAllText) {
		document.getElementById("toggleAll").innerHTML = hideAllText;
		for (i=0; i<a; i++) {
			if (document.getElementById(i)!=undefined){
				document.getElementById(i).style.display="block";
				document.getElementById("toggleText"+i).innerHTML = hideText;
			}
		}
	}
	else {
		document.getElementById("toggleAll").innerHTML = showAllText;
		for (i=0; i<a; i++) {
			if (document.getElementById(i)!=undefined){
				document.getElementById(i).style.display="none";
				document.getElementById("toggleText"+i).innerHTML = showText;
			}
		}
	}
}

function toggleDiv(divid, showText, hideText) {
	if(document.getElementById(divid).style.display == 'none'){
		document.getElementById(divid).style.display = "block";
		document.getElementById("toggleText"+divid).innerHTML = hideText;
	}else{
		document.getElementById(divid).style.display = "none";
		document.getElementById("toggleText"+divid).innerHTML = showText;
	}
}

//-->