
function start() {
 //document.getElementById('loadingImg').style.display = "none";
 //document.getElementById('galleryContainer_0').style.display = 'block';
 Animation(document.getElementById('gallery1')).to('height', '540px').from('540px').to('width', 'auto').from('0px').to('opacity', 1).from(0).blind().show().go(); return false;

 }
window.onload = start; 

function getRequest()
{
    var ua = navigator.userAgent.toLowerCase();
    if (!window.ActiveXObject)
      request = new XMLHttpRequest();
    else if (ua.indexOf('msie 5') == -1)
      request = new ActiveXObject("Msxml2.XMLHTTP");
    else
      request = new ActiveXObject("Microsoft.XMLHTTP");
     
     return request;
}
   
function getGallery(path)
 {
    
     document.getElementById("gallery1").innerHTML = "<center><br/><br/><br/><br/><br/><br/><br/><br/><span id='loadingSpan' style='font-size:30px;font-weight:300;color:#5c5c5d;'>Loading...</span></b><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></center>";
    ///alert(path);
    var url = "gallery.aspx?path=" + path
    //random var to get around IE caching issue
    url += "&random=" + Math.random();
    actionRequest.open("GET", url, true);
    actionRequest.onreadystatechange = this.setGallery;
    actionRequest.send(null);
     
 }
     
 function setGallery()
 {
 
  
 
     if (actionRequest.readyState == 4)
       if (actionRequest.status == 200)
       document.getElementById("gallery1").innerHTML = actionRequest.responseText;
       //alert(actionRequest.responseText);
        //document.getElementById("average_per_day").innerHtml = actionRequest2.responseText;
        else if (actionRequest.status == 404)
             document.getElementById("gallery1").innerHTML = "";
       else
     document.getElementById("gallery1").innerHTML = "<center>Error...</center>";
}


//document.getElementById('content').style.display = 'block';
var actionRequest = getRequest();
getGallery("sse_portfolio/Fashion");



//function show(object)
//{
//    var myNewString = object.replace(".menuOption", "");
//    
//    //hide all
//    for(var x = 0; x<100;x++)
//    {
//    
//      if( document.getElementById('galleryContainer_' + x))
//      {
//        document.getElementById('galleryContainer_' + x).style.display = 'none';
//      }    
//    }
//    
//    //show selected
//     document.getElementById(myNewString).style.display = 'block';
//     Animation(document.getElementById(myNewString)).to('height', '530px').from('530px').to('width', 'auto').from('0px').to('opacity', 1).from(0).blind().show().go(); return false;

//  

//}
