// set to true to enable hit box tracking
var hitboxEnabled = true;

// ACCOUNT NUMBER(S)
// should be something like: 'DM570627ECNC38EN3;DM57050997CW38EN3' 
var hitboxAccountNumber = "DM570530IEDV38EN3;DM57050997CW38EN3";          

// MULTI-LEVEL CONTENT CATEGORY
// should be something like: '/creativeservicestestacct;/Test+Do+Not+Use/creativeservicestestacct' 
var hitboxMultiLevelContentCategory = "/boostmobile;/Telco+internet/boostmobile";     


//LIGHTBOX Code

var win = null;
var index = 1;
function openDialog(id,w,h) {
    Dialog.alert( _proxy_jslib_handle($(id), 'innerHTML', '', 0, 0), {className: "alphacube",  width:w, height:h, id: "d" + index})
 index++;
	document.getElementByClass('icon').style.display = 'none';
	document.getElementByClass('photo').style.display = 'none';
}

function lastDialog(id) {
    Dialog.confirm( _proxy_jslib_handle($(id), 'innerHTML', '', 0, 0), {className: "alphacube",  width:250, okLabel: "Close All", ok: closeAllModalWindows})
}

function closeAllModalWindows() {
    Windows.closeAllModalWindows();
    //return true;
	document.getElementByClass('icon').style.display = 'inline';
	document.getElementByClass('photo').style.display = 'inline';
}

function copyit(theField) {
	var tempval=eval(_proxy_jslib_proxify_js(("document."+theField), 0, 0) )
	tempval.focus()
 tempval.select()
 therange=tempval.createTextRange()
  _proxy_jslib_handle(therange, 'execCommand', '', 1, 0)("Copy")
}


/**************************************
Video Swap


directions:  
inser the following html:

    <div id="videoPlayerContainer">
        <div id="videoPlayer"></div>
        <div id="videoTextContainer">
            <div id="videoTextHeader"></div>
                <span>Video URL:</span><input type="text" id="textVideoUrl" />
                <span>Embed Code:</span><input type="text" id="textVideoCode" />
        </div>
    </div>
    <a href="javascript:void(0);" onclick="OnVideoClick(12345, 'text for video 1');">video 1</a>
    <a href="javascript:void(0);" onclick="OnVideoClick(123456, 'text for video 2');">video 2</a>
    <a href="javascript:void(0);" onclick="OnVideoClick(123453, 'text for video 3');">video 3</a>


and then trigger the video switch by making a call to OnVideoClick('2023434112', 'cheese') with the 
corresponding video id and caption to be placed in the header text.
***************************************/
var defaultWidth = 402;
var defaultHeight = 323;

// loads the video player and then changes the text.
// width and height are optional
function OnVideoClick(videoId, headerText, width, height) {
    LoadVideo(videoId, width, height);
    LoadVideoText(videoId, headerText);
}

// loads the video player
// width and height are optional
function LoadVideo(videoId, width, height) {
    // if the width and height have been specified, we set it.
    // otherwise we use the default width and height that are defined above
    width = (width) ? width : defaultWidth;
    height = (height) ? height : defaultHeight;
    
    // change the video source   
    var videoPlayerContainer =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('videoPlayer');
     _proxy_jslib_assign('', videoPlayerContainer, 'innerHTML', '=', ( '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoId + ',t=1,mt=video,ap=1,sr=0" width="' + width + '" height="' + height + '" allowFullScreen="true" type="application/x-shockwave-flash" wmode="opaque"></embed>'));
    

}

// sets the text header, video url, and video embed code.
function LoadVideoText(videoId, videoText) {
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('videoTextHeader'), 'innerHTML', '=', ( videoText));
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('textVideoUrl'), 'value', '=', ( 'http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=' + videoId));
     _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('textVideoCode'), 'value', '=', ( '<embed src="http://mediaservices.myspace.com/services/media/embed.aspx/m=' + videoId + ',t=1,mt=video,ap=1,sr=0" width="' + width + '" height="' + height + '" allowFullScreen="true" type="application/x-shockwave-flash" wmode="opaque"></embed>'));
}
 ;
_proxy_jslib_flush_write_buffers() ;