//meaVia common java script source file
//(c) meaVia Software - Patrick Glaudemans

// put all common java functions here


 //just to store some params for serveruse after lefthand menu button click
    function SetNavigationParams(param1, param2, action, theForm, DoPostBack, paramid1, paramid2)
    {        
        theForm.hiddenparam1.value = param1;
        theForm.hiddenparam2.value = param2;
        theForm.hiddenaction.value = action;
        theForm.hiddenparamid1.value = paramid1;
        theForm.hiddenparamid2.value = paramid2;
        
        if (DoPostBack)
        {
            __ManualPostBack(action, param1,theForm);
        }
    }
    
    //perform manual postback to trigger updatepanels
    function __ManualPostBack(eventTarget, eventArgument, theForm) 
    {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    
    function OpenMail(mailSubject)
    {        
        location.href = "mailto:hrm@njoymedia.nl?subject=" + mailSubject;
        return false;
    }

