    //****************************************************************************//
    //   Modified by: rokwerxcode@3rods.com on 2008-08-19
    //   Special thanks to http://andylangton.co.uk/ and, of course, http://www.google.com
    //   Three days ago I didn't know anything about programming or Java Script and I still don't...  XP
    //



    var viewportwidth;
    var viewportheight;

    //These control the percentage that the rokbox will take up in relation to the screen size.
    // works like this - Total width x multiplyWidth = % of the width for the rokbox. 
    // Maybe one day I'll figure out how to make it look good on 4:3 and 16:9 monitors.
    //You would think percentage based would look the same, but it looks different on  standard
    //aspect ration monitors as opposed to widescreen.

    var multiplyWidth = 0.90;
    var multiplyHeight = 0.82;

    //When the page loads, call the two functions below

    document.onLoad =dynamicSize(), fixOnResize();

    //incase we want to see the actual size of our browser window, just uncomment.
    //document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>')



    //This function figures out how big the browser window is and returns it.
    //***THANKS TO: http://andylangton.co.uk/
    function dynamicSize(){
     

    // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight

    if (typeof window.innerWidth != 'undefined')
    {
          viewportwidth = window.innerWidth,
          viewportheight = window.innerHeight
    }

    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

    else if (typeof document.documentElement != 'undefined'
         && typeof document.documentElement.clientWidth !=
         'undefined' && document.documentElement.clientWidth != 0)
    {
           viewportwidth = document.documentElement.clientWidth,
           viewportheight = document.documentElement.clientHeight
          
    }

    // older versions of IE

    else
    {
           viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
           viewportheight = document.getElementsByTagName('body')[0].clientHeight
           
    }
         return viewportwidth, viewportheight;
    }



    //This is called when the page loads, so it's waiting for the window to be resized to execute itself
    //this function changes the rokbox in memory when the browser is resized. This way, if someone maximizes the window
    //and then clicks the link that uses rokbox, the window will fill up the new dementions

    function fixOnResize(){

    var currheight;

    //run this when we resize
    window.onresize = function(){
       
       if(currheight != document.documentElement.clientHeight)
          {

       //run our function to get the current browser window size
       dynamicSize();
       
       //change the rokbox size attributes in memory
       window.rokbox.options.defaultSize.height = (viewportheight * multiplyHeight);   
       window.rokbox.options.defaultSize.width = (viewportwidth * multiplyWidth);   
       
       currheight = document.documentElement.clientHeight;
       
          }
       }   
    }





    //*********************** ROKBOX CONFIGURATION CODE BEGINS **********************************************//


    /* All the presets options are the custom ones */

    window.addEvent('domready', function() {
       rokbox = new RokBox({
          'theme': 'dark', // this string must match the theme folder name (string, no space, lowercase)
          'transition': Fx.Transitions.Quad.easeInOut, // Transition to use when opening RokBox
          'duration': 600, // Duration of opening RokBox Effect (integer, milliseconds)
          'chase': 50, // Chase to use for the animation. works only for growl, see next line. (integer)
          'frame-border': 20, // Width of each border if any (integer, pixels)
          'content-padding': 0, // Padding of internal content wrapper (integer, pixels)
          'arrows-height': 35, // Height of arrows div (integer, pixels)
          'effect': 'growl', // Type of effect to use. Presets are: 'quicksilver', 'growl', 'explode'
          'captions': 0, // Whether to enable or disable captions (boolean, 1 or 0)
          'captionsDelay': 800, // How long captions effect should last, when captions are enabled (integer, milliseconds)
          'scrolling': 0, // Makes RokBox follow when scrolling the page (boolean, 1 or 0)
          'keyEvents': 1, // Enable keyevents. Esc, Left, Right to close and change previous or next (boolean, 1 or 0)
          'overlay': {
             'background': '#000', // Overlay background color (string, hex color format with starting hash #)
             'opacity': 0.7, // Opacity of the overlay (float, from 0 to 1, 0.1 makes it invisible but clickable)
             'duration': 200, // Duration of overlay effect (integer, milliseconds)
    //         'transition': Fx.Transitions.Quad.easeInOut // Transition to use for opacity effect
             'transition': Fx.Transitions.Circ.easeInOut // Transition to use for opacity effect
          },
          'defaultSize': {
             //'width': 640, // Default RokBox window width (integer)
             //'height': 460 // Default RokBox window height (integer)
             'width': (viewportwidth * multiplyWidth),
             'height': (viewportheight * multiplyHeight)
          },
          'autoplay': 'true', // Enable or disable autoplay for QuickTimes and WM videos (string, 'true' or 'false')
          'controller': 'true', // Enable or disable controllers for QuickTimes and WM videos (string, 'true' or 'false')
    //      'bgcolor': '#181818', // Set Background colors for all videos and flash services that support it (string, hex color format with starting hash #)
          'bgcolor': '#181818', // Set Background colors for all videos and flash services that support it (string, hex color format with starting hash #)
          'youtubeAutoplay': 0, // Enable or disable autoplay for YouTube (boolean, 1 or 0)
          'vimeoColor': '00adef', // Vimeo Color Scheme (string, hex color format WITHOUT starting hash #)
          'vimeoPortrait': 0, // Enable or disable Vimeo Portrait Button (boolean, 1 or 0)
          'vimeoTitle': 0, // Enable or disable Vimeo Title caption (boolean, 1 or 0)
          'vimeoFullScreen': 1, // Enable or disable Vimeo FullScreen button (boolean, 1 or 0)
          'vimeoByline': 0 // Enable or disable Vimeo's Author line (boolean, 1 or 0)
       });
    });
