init = function () {


    /*var so = new SWFObject('mediaplayer.swf','mpl',278,228,'9'); 
    so.addParam('allowscriptaccess',"always"); 
    so.addParam("allowfullscreen","true"); 
    so.addParam("flashvars",'&autostart=false&duration=-1&file=video/'+videoName+'&amp;image=video/'+imgname); 
    so.write('vidmain') */

    var ele = document.getElementById("vidthumbs").getElementsByTagName("li");
    var allvideo = new Array('A_Team_V_Z_Team.flv', '5_way_ to_fail_fast.flv', 'SNIOP.flv', 'Optimism.flv', 'Bloopers.flv');
    var allimg = new Array('img-v-1.jpg', 'img-v-2.jpg', 'img-v-3.jpg', 'img-v-4.jpg', 'img-v-5.jpg');
    var videoName = allvideo[0];
    var imgname = allimg[0];
    var bannerText = '<embed height="228" width="278" flashvars="&amp;autostart=false&amp;duration=-1&amp;file=video/' + videoName + '&amp;image=video/' + imgname + '" allowfullscreen="true" allowscriptaccess="always" quality="high" name="mpl" id="mpl" style="" src="mediaplayer.swf" type="application/x-shockwave-flash"></embed>';
    /*<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,32,18" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="player" name="player" type="application/x-shockwave-flash" height="228" width="278"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value="'+videoName+'&image=video/'+imgname+'" /><param name="src" value="video/player.swf" /><embed height="228" width="278" src="video/player.swf" flashvars="file='+videoName+'&image=video/'+imgname+'" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash"></embed></object>*/
    var flashvars = {
        autostart: 'false',
        duration: '-1',
        file: 'video/' + videoName,
        image: 'video/' + imgname
    };
    var params = {
        allowscriptaccess: 'always',
        allowfullscreen: 'true',
        wmode: 'transparent'
    };
    swfobject.embedSWF("mediaplayer.swf", "vidmain", "278", "228", "9.0.0", "expressInstall.swf", flashvars, params);
    var selected = ele[0];
    //ele[0].className+=" over";

    //document.getElementById("vidmain").innerHTML=bannerText;

    for (var i = 0; i < ele.length; i++) {
        ele[i].i = i;
        var myindex;
        //On mouse over tasks
        ele[i].onmouseover = function () {
            if (this != selected) {
                this.className += " over";
            }
        }
        ele[i].onmouseout = function () {
            if (this != selected) {
                this.className = this.className.replace(new RegExp(" over\\b"), "");
            }
        }
        ele[i].onclick = function () {
            if (this != selected) {
                selected.className = this.className.replace(new RegExp(" over\\b"), "");
                this.className += " over";
                //document.getElementById("vidmain").innerHTML='';
                videoName = allvideo[this.i];
                imgname = allimg[this.i];
                myIndex = this.i;

                /*Flash*/
                var flashvars = {
                    autostart: 'false',
                    duration: '-1',
                    file: 'video/' + videoName,
                    image: 'video/' + imgname
                };
                var params = {
                    allowscriptaccess: 'always',
                    allowfullscreen: 'true',
                    wmode: 'transparent'
                };
                swfobject.embedSWF("mediaplayer.swf", "vidmain", "278", "228", "9.0.0", "expressInstall.swf", flashvars, params);
                /*var so = new SWFObject('mediaplayer.swf','mpl',278,228,'9'); 
                so.addParam('allowscriptaccess',"always"); 
                so.addParam("allowfullscreen","true"); 
                so.addParam("flashvars",'&autostart=false&duration=-1&file=video/'+videoName+'&amp;image=video/'+imgname); 
                so.write('vidmain') */
                /*document.getElementById("vidmain").innerHTML = '<embed height="228" width="278" flashvars="&amp;autostart=false&amp;duration=-1&amp;file=video/'+videoName+'&amp;image=video/'+imgname+'" allowfullscreen="true" allowscriptaccess="always" quality="high" name="mpl" id="mpl" style="" src="mediaplayer.swf" type="application/x-shockwave-flash"></embed>'; */
                selected = this;
            }
        }
    }
}


var win;
function launch() {
    win = window.open("salesxtra_demo2/launch.html", '', "fullscreen, resizable=no, toolbar=0, scrollbars=yes");
}


function popitup(url) {
    newwindow = window.open(url, 'name', 'height=650,width=790');
    if (window.focus) { newwindow.focus() }
    return false;
}
function popitup2(url) {
    newwindow = window.open(url, 'name', 'height=550,width=790');
    if (window.focus) { newwindow.focus() }
    return false;
}
 
