﻿function Content(metaDataID, url, image) {
    this.MetaDataID = metaDataID;
    this.URL = url;
    this.Img = image;
}


function LoadTicker() {
    var flashvars;
    flashvars = {
    }
    var params = {
        allowfullscreen: 'true',
        allowscriptaccess: 'always',
        wmode: 'transparent'
    }
    var attributes = {
        id: "ticker_flash_obj",
        name: "ticker_flash_obj"
    }
    swfobject.embedSWF('/ticker.swf', 'ticker_flash', '100%', '23', '9', false, flashvars, params, attributes);
}

function getFileName(url) {
    url = url.substring(0, (url.indexOf("#") == -1) ? url.length : url.indexOf("#"));//this removes the anchor at the end
    url = url.substring(0, (url.indexOf("?") == -1) ? url.length : url.indexOf("?"));//removes the query after the file name
    url = url.substring(url.lastIndexOf("/") + 1, url.length);//removes everything before the last slash in the path
    return url;
}

function gid(name) {
    return document.getElementById(name);
};
