﻿// JScript File

function getEmbed(accname)
{
var val = '<iframe id=\"iplaylist\" style="background-color: Transparent; vertical-align: top;" height="800px" width="100%" name="iplaylist" scrolling="no" frameborder="0" src=\"http://www.vbossengage.com/Engage/playlist.aspx?accName=' + accname + '\"></iframe>';
return val;
}

function getSyndiation(uniqueKey,width,height,scroll)
{
document.write(window.location.href);
var requestedDomain = window.location.href;
var val = '<iframe id=\"iplaylist\" style="background-color: Transparent; vertical-align: top;" height="' + height + '" width="' + width + '" name="iSyndication" scrolling="' + scroll + '" frameborder="0" src=\"localhost:50740/MMediaBrowser/Syndication.aspx?key=' + uniqueKey + '&reqDomain=' + requestedDomain + '\"></iframe>';
return val;
}

function getSyndication(param)
{
  var requestedParam = param;   // gets the real object
  var fieldName = "";           // gets the field name
  var height = "800px";         // Sets the height
  var width = "600px";          // Sets the Width
  var scroll = "no";            // Sets the Scroll
  var BackColor = "#FFFFFF";    // Sets the BackColor
  var UniqueKey = "";           // Sets the Key
  var DomainName = "";          // Set the Requested Domain Name
  
 //fieldName = typeof requestedParam + ",";
 //alert(typeof(requestedParam)); // object
 
 
// SETS THE RESEPECTIVE VALUES
DomainName = window.location.href;

for(i in requestedParam)
{
    //alert(i + "----" + requestedParam[i]); // object,key,0,
    if (i == "width")
        width = requestedParam[i];
    if (i == "height")
        height = requestedParam[i];
    if (i == "scroll")
        scroll = requestedParam[i];
    if (i == "BackColor")
        BackColor = requestedParam[i];
    if (i == "key")
        UniqueKey = requestedParam[i];   
    
}

var val = '<iframe id=\"iplaylist\" style="background-color: "'+ BackColor + '"; vertical-align: top;" height="' + height + '" width="' + width + '" name="iSyndication" marginheight="0" marginwidth="0" scrolling="' + scroll + '" frameborder="0" src=\"http://www.vbossengage.com/Engage/Syndication.aspx?key=' + UniqueKey + '&reqDomain=' + DomainName + '\"></iframe>';
return val
}
