/**********************
Author: ASDRC Pvt Ltd
Version: 1.0
***********************/

var mItemCollection = new Array(); /**** DO NOT EDIT THIS LINE**********/

/************* MODIFY THE SETTINGS BELOW *****************/

/******** Container Properties *********/
//--- Size --------
var mContainerHeight = '150';
var mContainerWidth = '375';
//--- Title Heading -----
var mContainerTitleLeft = '12'; //any +ve or -ve number
var mContainerTitleTop = 'bottom'; //top or middle or bottom
var mContainerTitleHeight = '23';
var mContainerTitleCaption = 'Thermage Videos'; //Leave this blank to hide the Title Eg: mContainerTitleCaption = '';
var mContainerTitleFontName = 'Arial';
var mContainerTitleFontSize = '10';
var mContainerTitleFontColor = '#333333';
var mContainerTitleFontWeight = 'bold'; //normal or bold
//--- Border ------------
var mContainerBorderSize = '1';
var mContainerBorderColor = 'transparent';
//--- Background --------
var mContainerBackgroundColor = '#efefef';
var mContainerBackImageURL = 'images/bg.jpg';
var mContainerBackImageOption = 'repeat'; //repeat or repeat-x or repeat-y or no-repeat
//--- Scrool Bar color --------
var mScrollbarfacecolor = ''; 
var mScrollbarhighlightcolor = '';
var mScrollbar3dlightcolor = '';
var mScrollbarshadowcolor = ''; 
var mScrollbardarkshadowcolor = ''; 
var mScrollbartrackcolor = '';
var mScrollbararrowcolor = '';

/******* Item Properties **************/
//--- Size --------
var mItemHeight = '104';
var mItemWidth = '350';
//--- Location --------
var mItemLeft = '12'; //any +ve or -ve number
var mItemTop = 'middle'; //top or middle or bottom
//--- Selection ------------
var mItemSelectionBackColor = '#efefef';
var mItemSelectionForeColor = '#333333';
//--- Border ------------
var mItemBorderSize = '1';
var mItemBorderColor = '#cccccc';
//--- Background ------------
var mItemBackColor = 'white';
//--- Fonts ------------
var mItemFontName = 'Arial';
var mItemFontSize = '10';
var mItemFontColor = '#333333';

/******* Item Collection **************/
AddItem("thumbnails/thermage-thumb5.jpg","Dr Gidon features Thermage on Discovery TV","video/thermage-doctor.swf","Discovery TV",300,160,' - 1:40');
AddItem("thumbnails/thermage-thumb3.jpg","Thermage procedure on NBC","video/thermage-clinic.swf","NBC",322,280,' - 1:30');
AddItem("thumbnails/thermage-thumb2.jpg","Dr Gidon treats cellulite with Thermage","video/thermage-cellulite.swf","Cellulite",320,280,' - 1:20');
AddItem("thumbnails/thermage-thumb1.jpg","Thermage for treatment of cellulite","video/thermage-cellulite-2.swf","Cellulite",325,280,' - 1:20');
AddItem("thumbnails/thermage-thumb4.jpg","Thermage in the news","video/thermage-clips.swf","News",402,340,' - 2:20');


/**********************************************************************
************* DO NOT MODIFY ANY THING BELOW THIS LINE *****************
**********************************************************************/

Show();

function Show()
{
	var cPreview = '';
	cPreview += '<table style="width:'+mContainerWidth+'px; height:'+mContainerHeight+'px;background-image:url('+mContainerBackImageURL+');background-repeat:'+mContainerBackImageOption+';background-color:'+mContainerBackgroundColor+';border:solid '+mContainerBorderSize+'px '+mContainerBorderColor+'" cellspacing="0" cellpadding="0" border="0">';
	if(mContainerTitleCaption.length > 0)
	{
		cPreview += '<tr><td height="'+mContainerTitleHeight+'" style="padding:2px 0px 2px 0px;vertical-align:'+mContainerTitleTop+'"><label style="text-align:left;font-weight:'+mContainerTitleFontWeight+';font-family:'+mContainerTitleFontName+';font-size:'+mContainerTitleFontSize+'px;color:'+mContainerTitleFontColor+';margin-left:'+mContainerTitleLeft+'px">'+mContainerTitleCaption+'</label></td></tr>';
	}
	cPreview += '<tr><td style="padding: 0px;vertical-align:'+mItemTop+'">';
	cPreview += '<div style="margin-left:'+mItemLeft+'px;background-color:'+mItemBackColor+';width:'+mItemWidth+'px; height:'+mItemHeight+'px; overflow:auto; border:solid '+mItemBorderSize+'px '+mItemBorderColor+';scrollbar-face-color:'+mScrollbarfacecolor+';scrollbar-highlight-color:'+mScrollbarhighlightcolor+';scrollbar-3dlight-color:'+mScrollbar3dlightcolor+';scrollbar-shadow-color:'+mScrollbarshadowcolor+';scrollbar-darkshadow-color:'+mScrollbardarkshadowcolor+'; scrollbar-track-color:'+mScrollbartrackcolor+';scrollbar-arrow-color:'+mScrollbararrowcolor+'">';
		
	cPreview += '<Table cellspacing="0" cellpadding="0">';
	for(var i=0; i < mItemCollection.length; i++)
	{
		cPreview += '<tr style="cursor:pointer;background-color:'+mItemBackColor+';Color:'+mItemFontColor+';font-family:'+mItemFontName+'; font-size:'+mItemFontSize+'px" onmouseout="MouseOut(this);" onmousemove="MouseMove(this);" onclick="MouseClick(\'mb'+(i+1)+'\')">';
		cPreview += '<td style="padding:2px;border-bottom:dotted 1px silver" width="10%"><img src="'+ mItemCollection[i][0] +'" border="0" align="middle"></td>';
		cPreview += '<td width="90%" style="padding:5px;text-align:left;vertical-align:middle;border-bottom:dotted 1px silver">' + mItemCollection[i][1] + '<a href="'+mItemCollection[i][2]+'" rel="width:'+mItemCollection[i][4]+',height:'+mItemCollection[i][5]+',type:swf" id="mb'+(i+1)+'" name="mb'+(i+1)+'" class="mb" title="'+mItemCollection[i][3]+'"></a></td></tr>';
		cPreview += '<div class="multiBoxDesc mb'+(i+1)+'">' + mItemCollection[i][1] + '</div>';
	}
	cPreview += '</Table>';
	cPreview += '</div>';
	cPreview += '</td></tr>';
	cPreview += '</table>';
	
	document.write(cPreview);
}

function MouseOut(vObjTD)
{
	vObjTD.style.backgroundColor = mItemBackColor;
	//document.getElementById("mb"+vObjID).style.color = mItemFontColor;
	vObjTD.style.color = mItemFontColor;
	//var f = document.getElementById("mb"+vObjID);
}

function MouseMove(vObjTD)
{
	vObjTD.style.backgroundColor = mItemSelectionBackColor;
	//document.getElementById("mb"+vObjID).style.color = mItemSelectionForeColor;
	vObjTD.style.color = mItemSelectionForeColor;
}

function MouseClick(vObjTD)
{
	var e = document.getElementById(vObjTD);
    if (typeof e == 'object') {
        /*if(typeof e.click != 'undefined') {
            e.click();
            alert('click');
            return false;
        }
        else */
        if(document.createEvent) {
            var evObj = document.createEvent('MouseEvents');
            evObj.initEvent('click',true,true);
            e.dispatchEvent(evObj);
            //alert('createEvent');
            return false;
        }
        /*else if(document.createEventObject) {
            e.fireEvent('onclick');
            //alert('createEventObject');
            return false;
        }*/
        else {
            e.click();
            //alert('click');
            return false;
        }
    }
}

function AddItem(thumbnail_url,Caption,target_url,video_title,vWidth, vHeight,vLenght)
{
	var itmx = new Array();
	itmx[0] = thumbnail_url;
	itmx[1] = Caption+'<style="font-family:verdana;font-size:14px;font-color:#efefef;margin:3px 0px 0px 0px">'+ vLenght;
	itmx[2] = target_url;
	itmx[3] = video_title;
	itmx[4] = vWidth;
	itmx[5] = vHeight;
	mItemCollection[mItemCollection.length] = itmx;
}