
 var vd = new Array(6);

 vd[0] = ''; 
 vd[1] = "3D_Architecture.wmv";
 vd[2] = "3D_Civil_Engineering_16X9.wmv";
 vd[3] = "3danimation_16X9.wmv";
 vd[4] = "GravityEdge16X9.wmv";
 vd[5] = "PeachState_16X9.wmv";
 vd[6] = "special_effects01_16X9.wmv";

  var pic = new Array(12);
  var picptr = 0;
  var sldshw = false;
  var sldrun = false;
  var sldtime = 7000;  
  var piccnt = 10;
 pic[0] = "355.jpg";
 pic[1] = "arlington_gi_only.jpg";
 pic[2] = "cherokeepark.jpg";
 pic[3] = "cherokeepark_finalgather.jpg";
 pic[4] = "Home_Car_Dude.jpg";
 pic[5] = "lake_club_02_final_gather.jpg";
 pic[6] = "TownCenter0003.jpg";
 pic[7] = "RoofTopStill_nov2007.jpg"; 
 pic[8] = "vg_with_hdri03.jpg"; 
 pic[9] = "f18.jpg";
 pic[10] = "dblplane.jpg";
 
 var prlpic = new Array(12);
 prlpic[0] = new Image(480,270);
 prlpic[0].src = "355.jpg";
 prlpic[1] = new Image(480,270);
 prlpic[1].src = "arlington_gi_only.jpg";
 prlpic[2] = new Image(480,270);
 prlpic[2].src = "cherokeepark.jpg";
 prlpic[3] = new Image(480,270);
 prlpic[3].src = "cherokeepark_finalgather.jpg";
 prlpic[4] = new Image(480,270);
 prlpic[4].src = "Home_Car_Dude.jpg";
 prlpic[5] = new Image(480,270);
 prlpic[5].src = "lake_club_02_final_gather.jpg";
 prlpic[6] = new Image(480,270);
 prlpic[6].src = "TownCenter0003.jpg";
 prlpic[7] = new Image(480,270);
 prlpic[7].src = "RoofTopStill_nov2007.jpg";
 prlpic[8] = new Image(480,270);
 prlpic[8].src = "vg_with_hdri03.jpg";
 prlpic[9] = new Image(480,270);
 prlpic[9].src = "f18.jpg";
 prlpic[10] = new Image(480,270);
 prlpic[10].src = "dblplane.jpg";
 
 
 // try preloading
 
 
 
/* ================================================================
    Correct way to attach events to the onload function
   ================================================================ */
   function addEvent(obj,evType,fn) {
    if (obj.addEventListener) {
        obj.addEventListener(evType, fn, false);
        return true;
    } else if (obj.attachEvent) {
        var r = obj.attachEvent("on"+evType, fn);
        return r;
    } else {
        return false;
    }
    }

/*  ===================================
    make an Ajax request to the server 
    =================================== */
    function MakeRequest() {
             var http_request = false;
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/html');
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }
        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance)');
            return false;
        }
   
        return http_request;        
        
    }

/*  =========================================
    Process an Ajax response from the server
    ========================================= */ 
    
    function Contents(http_request,DoResponse,context) {
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
                DoResponse(http_request.responseText);
            } else {
                alert('There was a problem with the request.' + context);
            }
        }
    }

/*  =========================================
    Get the host home or the Current directory
    ========================================= */ 

    function GetHome() {
        var host =  "http://" + window.location.hostname + "/";
        return host;
    }
    function GetCurrent() {
        var host =  "http://" + window.location.hostname;
        var path =  window.location.pathname.split("/")
        path.length -= 1;

        for (var i in path) {
            if (path[i].length > 0) host += "/" + path[i];
        }
        return host + "/";
    
        
    }

/*  =============================================
    Get a reference to any div and most elements
    ============================================= */ 
function getRefToDiv(divID,oDoc) {
  if( document.getElementById ) {    return document.getElementById(divID); }
  alert("here");
  if( document.all ) {    return document.all[divID]; }
  if( !oDoc ) { oDoc = document; }
  if( document.layers ) {
    if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
      //repeatedly run through all child layers
      for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
        //on success, return that layer, else return nothing
        y = getRefToDiv(divID,oDoc.layers[x].document); }
    return y; } }
  return false;
}



/*  =========================================
    Dump all properties usefull
    ========================================= */ 

function dumpProps(obj, parent) {
   // Go through all the properties of the passed-in object 
   for (var i in obj) {
      // if a parent (2nd parameter) was passed in, then use that to 
      // build the message. Message includes i (the object's property name) 
      // then the object's property value on a new line 
      if (parent) { var msg = parent + "." + i + "\n" + obj[i]; } else { var msg = i + "\n" + obj[i]; }
      // Display the message. If the user clicks "OK", then continue. If they 
      // click "CANCEL" then quit this level of recursion 
      if (!confirm(msg)) { return; }
      // If this property (i) is an object, then recursively process the object 
      if (typeof obj[i] == "object") { 
         if (parent) { dumpProps(obj[i], parent + "." + i); } else { dumpProps(obj[i], i); }
      } // end if
   } // end for
} // end function


function closecon() {
        window.setTimeout('closetop()',400);
}

function closetop() {
        tag = getRefToDiv("contact");
        tag.className = "invis";
}

function closeAll(et)
{
    tag = getRefToDiv("contact");
    tag.className = "invis";
    
    for ( var x = 0 ; x<8; x++)
    {
        ds = "dsc" + x;
        tag = getRefToDiv(ds);
        if (tag) tag.className = "descoff";
        tg = "opt"+x;
        mg = "mov"+x;
        tag = getRefToDiv(mg);
        if ((tag.className != "movt") && (x != 7)) tag.innerHTML = "";
        if (x == 7) {
            tag.className = "picoff";
            tag = getRefToDiv("fd-slider-slider-r");
            tag.style.display = "none";
        }
        tag = getRefToDiv(tg);
        tag.className = "optcls";
    }
    return true;
    
}

function openthis(targ)
{
    sldshw = false;
    closeAll();
    ds = "dsc" + targ;
    tag = getRefToDiv(ds);
    if (tag) tag.className = "desc";
    tg = "opt" + targ;
    tag = getRefToDiv(tg);
    tag.className = "optopn";
    if (targ == '0') return;
    mg = "mov" + targ;
    tag = getRefToDiv(mg);
    //tag.className = "movoff";
    tag.innerHTML = embedVideo(targ);
    
    
}

function openone(targ)
{
    if (sldshw) return;
    sldshw = true;
    closeAll();    
    tg = "opt" + targ;
    mg = "mov" + targ;
    tag = getRefToDiv(tg);
    tag.className = "optopn";
    tag = getRefToDiv(mg);
    tag.className = "pic";
    picptr = -1;
    tag = getRefToDiv("fd-slider-slider-r");
    tag.style.display = "block";
    ds = "dsc" + targ;
    tag = getRefToDiv(ds);
    if (tag) tag.className = "descn";
    chgPic();
    
}

function changePic(targ)
{
    mg = "mov" + targ;
    tag = getRefToDiv(mg);
    tag.innerHTML = nextPic(targ);
}

function chgPic(targ)
{       
    sldrun = false;
        tag = document.getElementById("sldshw1");
        tag.src = nxtPic();
}

function nxtPic(targ)
{
    var rv = '<img src="' + prlpic[picptr] + '" Height="270" width="480">';
    picptr += 1;
    if (picptr > piccnt) picptr =0;   
    document.getElementById('slider-r').value = picptr;
    sld = fdSliderController.sliders["slider-r"];
    sld.recalculate();
    if (sldshw & !sldrun) 
    {
        window.setTimeout('chgPic(7)',sldtime);
        sldrun = true;
    }
    return prlpic[picptr].src;
}

function updatePicpos() {
        var r = parseInt(document.getElementById('slider-r').value) || 0;
        picptr = r;
        tag = document.getElementById("sldshw1");
        tag.src = prlpic[picptr].src;

        document.getElementById('slider-r').value = picptr;
}


function nextPic(targ)
{
    var rv = '<img src="' + pic[picptr] + '" Height="270" width="480">';
    picptr += 1;
    if (picptr > piccnt) picptr =0;    
    if (sldshw) window.setTimeout('changePic(7)',sldtime);
    return rv
}

function embedVideo(tg)
{
    return embededvideo(vd[tg],480,270);
}

function embededvideo(name,  wid, hgt) 
{
    var browser=navigator.appName;
    var b_version=navigator.appVersion;
    var version=parseFloat(b_version);
    var rv = '';
    if ( browser.indexOf("Explorer") > 0)
    {
        brwsr = "explorer";
    } else {
        brwsr = "firefox";
    }
    if (brwsr != 'explorer') {
        rv = '<OBJECT ID="contentPlayer" width=' + wid;
        rv = rv + ' height=' + hgt;
        rv = rv + ' standby="Loading Media Player" type="application/x-ms-wmp">';
    } else {
        rv = '<OBJECT id="contentPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="' + wid;
        rv = rv + '" height="' + hgt + '" standby="Loading Media Player" type="application/x-ms-wmp"  >';
    }
    rv = rv + '<PARAM NAME="URL" VALUE="' + name + '">';
    rv = rv + '<PARAM NAME="AutoStart" Value="true">';
    rv = rv + '<PARAM NAME="uiMode" VALUE="none">';

    rv = rv + '<PARAM NAME="Rate" VALUE="1">';
    rv = rv + '<PARAM name="PlayCount" value="9999">';
    rv = rv + '</OBJECT>';

    return rv;
}    

function shwContact()
{
    closeAll();
    tag = getRefToDiv("contact");
    tag.className = "vis";
       
    
    
}
function setLeft(e) {
   var width = 0;
   var height = 0;
   if (document.documentElement) {
        width = document.documentElement.clientWidth;
        height = document.documentElement.clientHeight;
        
   } else {
        width = document.body.clientWidth;
        height = document.body.clientHeight;
   }
   var xleft = (((width-800)/2) - 160)
   if (xleft < 0) xleft=0;
   xleft = xleft + "px";
   var myi = getRefToDiv("myintro");
   myi.style.left = xleft;
   return true;
}


