	
		var glassWorkOpn = {
		 INTRO: "Default",
			RES : "Residential" ,
			COM : "Commercial",
			RLG : "Religious",
			KTN : "KitchenBath"};

		
	 function loadLogo(){
      var Img ;
			var movie;
			var rgnShow = document.getElementById('title');
			var _width = 230; //default flash container style values
			var _height = 96;
      movie = "reflectiveLOGO.swf"
      
      Img = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\"";
			Img += " width=\""+ _width +"\" height=\""+ _height +"\" id=\"" + "reflectiveLOGO";
			Img += "\" align=\"center\"><param name='allowScriptAccess' value='sameDomain' />";
			Img += " <param name='movie' value='" + movie +"' />";
			Img += " <param name='quality' value='high' />";
			Img += " <param name='bgcolor' value='#303030' />";
			Img += " <param name='play' value='true' />";
			Img += " <param name='menu' value='true' />";
			Img += " <param name='LOOP' value='false' />";
			Img += " <embed src='" + movie + "' play='true' menu='true' loop='false' quality='high' bgcolor='#303030' width='" + _width + "' height='" + _height + "'";
			Img += " name='reflectiveLOGO' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
   
			
			rgnShow.innerHTML = Img;
			
   }
		

		function loadFlash(glassWorkType){
			var Img ;
			var movie;
			var rgnShow = document.getElementById('flashshowrgn');
			var rgnRNav = document.getElementById('right-navigate'); 
			var _top = 55;
			var _width = 590; //default flash container style values
			var _height = 550; //rgnShow.offsetHeight; 
			var _left = 150;
		  var _shiftRt = 30;
		  var _rtNavHeight = rgnRNav.offsetHeight; //120;
		

			switch(glassWorkType){
			case glassWorkOpn.INTRO:
			  movie =  glassWorkOpn.INTRO + ".swf"; 
			  _width = 750;
			 _height = 440;
			 //alert(" _rtNavHeight " + _rtNavHeight);
			 var prevWidth = 0;
       if (rgnShow.style.width) prevWidth = parseInt(rgnShow.style.width,10);
			 if (_width >= prevWidth) _left = 5;
			 break;
			case glassWorkOpn.RES:
			 movie = glassWorkOpn.RES + ".swf" ;
			 break;
			case glassWorkOpn.COM:
			 movie =  glassWorkOpn.COM + ".swf"; 
			 _width = 750;
			 _height = 440;
			 var prevWidth = 0;
       if (rgnShow.style.width) prevWidth = parseInt(rgnShow.style.width,10);
			 if (_width >= prevWidth) _left = 5;
			 break;
			case glassWorkOpn.RLG:
			 movie =  glassWorkOpn.RLG + ".swf"; 
			 break;
			case glassWorkOpn.KTN: 
			 movie =  glassWorkOpn.KTN + ".swf"; 
			 break;
			 default: movie = glassWorkOpn.RES + ".swf" ;
			}
    
       rgnShow.style.position = "absolute";
       rgnShow.style.top = _top;
			 rgnShow.style.width = _width;
			 rgnShow.style.height = _height;
			 rgnShow.style.left = _left;
					
       rgnRNav.style.top = _height - _rtNavHeight;
       
       
			Img = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\"";
			Img += " width=\""+ _width +"\" height=\""+ _height +"\" id=\"" + glassWorkType;
			Img += "\" align=\"center\"><param name='allowScriptAccess' value='sameDomain' />";
			Img += " <param name='movie' value='" + movie +"' />";
			Img += " <param name='quality' value='high' />";
			Img += " <param name='bgcolor' value='#303030' />";
			Img += " <param name='play' value='true' />";
			Img += " <param name='menu' value='true' />";
			Img += " <param name='LOOP' value='false' />";
			Img += " <embed src='" + movie + "' play='true' menu='true' loop='false' quality='high' bgcolor='#303030' width='" + _width + "' height='" + _height + "'";
			Img += " name='" + glassWorkType + "'  wmode='opaque' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
   
			rgnShow.style.zIndex = 1;
			//rgnShow.childNodes[1].style.zIndex = 1;
			rgnShow.innerHTML = Img;
			
			//alert(rgnShow.innerHTML);
			
		}

		function loadContent(content){
			var rgnShow = document.getElementById('flashshowrgn');
			var _width = 550; //default flash container style values
			var _height = 400;
			var img;
			//img = "<image src=\"" + content + ".jpg\" width=\"550\" height=\"400\" />";
			//rgnShow.innerHTML = img;
			rgnShow.style.backgroundImage="url(" + content + ".png)"  ;
			rgnShow.style.fontFamily = "Constantia";
			rgnShow.style.fontSize = "13";
			rgnShow.style.fontWeight="normal";
  	 		rgnShow.style.color="#C0C0C0";
			rgnShow.style.width = _width;
			rgnShow.style.height = _height;
			//rgnShow.innerHTML = "<span class=\"contentText\">
			//alert(rgnShow.innerHTML);
		}

/***********************************Image MouseOver functions**********************************/

var scrollInterval;

function showScrollable(object,srcpath) {			
	//scrollInterval = window.setInterval('checkScroll(\''+object+'\',\''+ srcpath +'\')', 1);	
  checkScroll(object,srcpath);
	if (document.getElementById && (document.getElementById(object)!=null)) {	
		document.getElementById(object).style.visibility = 'visible';	
	}
}

function hideScrollable(object) {	
	//clearInterval(scrollInterval);
	if (document.getElementById && (document.getElementById(object)!=null)) {
	document.getElementById(object).style.visibility = 'hidden';
	}

}

function checkScroll(object,srcpath) {	
	var object = document.getElementById(object);
	var img;
	var contentRgn = document.getElementById('flashshowrgn');
	var detailTxtRgn = document.getElementById("classdesc");
	var anImg = document.getElementById("firstImg");
	var _left ;
	var _top ;//
	var _width = 600;
	//var _txtRgnWidth = detailTxtRgn.offsetLeft + detailTxtRgn.clientWidth;
	var _cntRgnWidth = contentRgn.offsetLeft + contentRgn.clientWidth;
	var _imgWidth = 120;
	var _height = 325;
	var _scrollX = 0;
	var img;
	
	var menuImg = document.getElementById("menuImage");
	
	if (menuImg) _width = menuImg.childNodes[0].width;
	
	
	srcpath = "content/ThumbnailsMouseovers/" + srcpath;
	
	if (document.getElementById && (object!=null)) {		
		//object.style.top = Math.round((getClientHeight()/2)-(object.style.height/2)+getScrollTop())+'px';
	
   
  
  	if(object.childNodes[0].tagName == "IMG" ){ 
        img = object.childNodes[0];
        img.setAttribute("src",srcpath);
      }
      
	//alert("srcpath " + srcpath + " img.tagName " + img.tagName + "img.src " + img.getAttribute("src"));
    
    if( anImg.parentNode) _imgWidth = anImg.parentNode.clientWidth;
      
       
   // alert("_txtRgnWidth " + _txtRgnWidth + " _cntRgnWidth " + _cntRgnWidth + " _imgWidth " + _imgWidth);
     var firstP = realPreviousSibling(detailTxtRgn);
   
     if(firstP) _top =  firstP.clientHeight + 40;
     else{ firstP = realPreviousParent(detailTxtRgn);
         if(firstP) _top = Math.round(firstP.offsetTop)+10;
           //alert("sr got here! _top " + _top);
     }
   
		  
		if( object.style.height ) object.style.height = _height;
		object.style.position = "absolute";
		_scrollX = getScrollX();
	  //_txtRgnWidth -
		 object.style.right = Math.round( ( ( _imgWidth + 15) - _scrollX ) ) + "px";
     //alert(object.style.right);
   
    object.style.top =  _top + "px" ;
    object.style.width = _width + "px";
     

	
   
	}
}
function realPreviousParent(node){
  var tempNode=node.parentNode;
  
    while(tempNode && tempNode.nodeType!=1){
      tempNode=tempNode.parentNode;
    }
      
  return tempNode;
}


function realPreviousSibling(node){
 
  var tempNode=node.previousSibling;
  
  
    while(tempNode && tempNode.nodeType!=1){
      tempNode=tempNode.previousSibling;
     }
      
  return tempNode;
}

function getScrollX() {
  var scrOfX = 0;
  if( typeof( window.pageXOffset ) == 'number' ) {
    //Netscape compliant
    scrOfX = window.pageXOffset;
    
  } else if( document.body && ( document.body.scrollLeft   ) ) {
    //DOM compliant
    scrOfX = document.body.scrollLeft ;
    
  } else if( document.documentElement && ( document.documentElement.scrollLeft  ) ) {
    //IE6 standards compliant mode
     
    scrOfX = document.documentElement.scrollLeft;
  }
  //alert("scrOfX  " + scrOfX);
  return  scrOfX;
}
function getClientWidth() {
	var x=0;
	if (self.innerWidth) { // all except Explorer
		x = self.innerWidth;		
	} else if (document.documentElement && document.documentElement.clientWidth) { // Explorer 6 Strict Mode	
		x = document.documentElement.clientWidth;
	} else if (document.body) { // other Explorers
		x = document.body.clientWidth;		
	}
	return x;
}

function getClientHeight() {
	var y=0;	
	if (self.innerHeight) { // all except Explorer
		y = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode			
		y = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers	
		y = document.body.clientHeight;
	}
	return y;
}

function getScrollTop() {
	var y=0;
	if (self.pageYOffset) { // all except Explorer		
		y = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict		
		y = document.documentElement.scrollTop;
	} else if (document.body) { // all other Explorers
		y = document.body.scrollTop;
	}
	return y;
}

function HideDiv(adiv){
	if (document.getElementById(adiv) != null){
      		document.getElementById(adiv).style.visibility = "hidden";
	}
}

function ShowDiv(adiv){
	if (document.getElementById(adiv) != null){
		document.getElementById(adiv).style.visibility = "visible";
	}
}



/**********************************End MouseOver functions*************************************/