var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    try {
        xmlhttp = new XMLHttpRequest();
    } catch (e) {
        xmlhttp=false;
    }
}
if (!xmlhttp && window.createRequest) {
    try {
        xmlhttp = window.createRequest();
    } catch (e) {
        xmlhttp=false;
    }
}




function hideandshow(tempid){
           document.getElementById("displayareaContent").innerHTML='<div style="float:right;"><img src="images/load.gif" /></div>';
           var browserString=String(navigator.appName);
           for(var i=1; i<=10; i++){
                 document.getElementById("menu"+i).innerHTML='<img src="images/nav/' + i + '_grey.jpg" onmouseover="this.src=\'images/nav/' + i + '.jpg\'" onmouseout="this.src=\'images/nav/' + i + '_grey.jpg\'" />';
           }
           document.getElementById("menu"+tempid).innerHTML='<img src="images/nav/' + tempid + '.jpg" />';
           newid=tempid;
           if(tempid==6 && browserString.match("Microsoft")){
                newid=61;
           }
           xmlhttp.open("GET", newid+".php",true);
           xmlhttp.onreadystatechange=function() {
                if (xmlhttp.readyState==4) {           
                    document.getElementById("displayareaContent").innerHTML=xmlhttp.responseText;
                    if(tempid==6){
                        if(browserString.match("Microsoft")){
                            do_carouselie();
                        }else{
                            do_carousel();
                        }
                    }
                    tb_init('a.thickbox, area.thickbox, input.thickbox');
                }
           }
           xmlhttp.send(null)
}

function do_carouselie(){

    $('#changePhotos1').click(function(){
           document.getElementById("displayareaContent").innerHTML='<div style="float:right;"><img src="images/load.gif" /></div>';
           xmlhttp.open("GET", "62.php",true);
           xmlhttp.onreadystatechange=function() {
                if (xmlhttp.readyState==4) {           
                    document.getElementById("displayareaContent").innerHTML=xmlhttp.responseText;
                    do_carousel();
                    tb_init('a.thickbox, area.thickbox, input.thickbox');
                }
           }
           xmlhttp.send(null);
           do_carouselie();
    });
    
    $('#changePhotos2').click(function(){
           document.getElementById("displayareaContent").innerHTML='<div style="float:right;"><img src="images/load.gif" /></div>';
           xmlhttp.open("GET", "61.php",true);
           xmlhttp.onreadystatechange=function() {
                if (xmlhttp.readyState==4) {           
                    document.getElementById("displayareaContent").innerHTML=xmlhttp.responseText;
                    do_carousel();
                    tb_init('a.thickbox, area.thickbox, input.thickbox');
                }
           }
           xmlhttp.send(null); 
           do_carouselie();   
    });

do_carousel(); 
 
}

function do_carousel(){
    
$(".photoList1").jCarouselLite({
    btnNext: ".next1",
    btnPrev: ".prev1",
    visible: 4,
    circular: false,
    scroll: 1
});
$(".photoList2").jCarouselLite({
    btnNext: ".next2",
    btnPrev: ".prev2",
    visible: 4,
    circular: false,
    scroll: 1
});
$(".photoList3").jCarouselLite({
    btnNext: ".next3",
    btnPrev: ".prev3",
    visible: 4,
    circular: false,
    scroll: 1
});
$(".photoList4").jCarouselLite({
    btnNext: ".next4",
    btnPrev: ".prev4",
    visible: 4,
    circular: false,
    scroll: 1
});

}