
/* Dataview Webpart Forms engine*/
function VWSendForm(redirurl, message, action) {

    var theForm = document.forms['aspnetForm'];
    if (theForm.vwFormRedirecturl != null)
        theForm.vwFormRedirecturl.value = redirurl;
    if (theForm.vwFormMessage != null)
        theForm.vwFormMessage.value = message;
    if (theForm.vwFormAction != null)
        theForm.vwFormAction.value = action;
    theForm.submit();
    return true;
}


/* "Siteactions" => "Create new page" openwindow handler*/
function VWCreatePage()
{
    try {
        OpenCreateWebPageDialog('/_layouts/createwebpage.aspx');
        window.setTimeout(IsDlgOpen, 500);        
	}
    catch (e) 
    {
		alert(e);
	}
}

function IsDlgOpen() {
    if (SP.UI.ModalDialog.get_childDialog() == null) {        
        window.document.location.href = window.document.location.href;
    }
    else {
        window.setTimeout(IsDlgOpen, 500);
    }    
}


