﻿// JScript File
    function aa(target, field, value)
    {
        //var f = document.createElement("<form id=\"userform\" name=\"userform\" method=\"post\" action=\"AccountAdmin.aspx\">");
        var f = document.createElement("form");
        f.setAttribute("method","post");
        f.setAttribute("action",target);
        var d = document.createElement("input");
        d.setAttribute("type","hidden"); 
        //d.setAttribute("id","userid");
        d.setAttribute("name",field);
        d.setAttribute("value",value);
        f.appendChild(d);
        document.body.appendChild(f);
        f.submit();
    }

    function aa_multi(target, fields, values)
    {
        var f = document.createElement("form");
        f.setAttribute("method","post");
        f.setAttribute("action",target);
        for(var i = 0; i < fields.length; i++)
        {        
            var d = document.createElement("input");
                d.setAttribute("type","hidden"); 
                d.setAttribute("name",fields[i]);
                d.setAttribute("value",values[i]);
            f.appendChild(d);
            document.body.appendChild(f);
        }
        
        f.submit();
    }
    
    function GoToContentPlayer(mediaID, galleryContentID)
    {
       var fields = new Array("mediaID", "galleryContentID");
       var values = new Array(mediaID, galleryContentID);
       aa_multi("ContentPlayer.aspx?gallerycontentid="+galleryContentID, fields, values);
    }
    
    function GoToEditContent(mediaID, galleryContentID)
    {
       window.location = "ContentView.aspx?gallerycontentid=" + galleryContentID + "&ReturnURL=" + window.location;
    }

