// Flash Detector
 var flash2Installed = false;    
 var flash3Installed = false;    
 var flash4Installed = false;   
 var flash5Installed = false;    
 var flash6Installed = false;
 var flash7Installed = false;
 var flash8Installed = false;  
 var maxVersion = 8; 
 var actualVersion = 0;         
 var hasRightVersion = false; 
 var jsVersion = 1.0;
 var gotflash = 0;
 
 // Check the browser...we're looking for ie/win
 var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    
 var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
 
 // This is a js1.1 code block, so make note that js1.1 is supported.
 jsVersion = 1.1;
 
 // Write vbscript detection on ie win. IE on Windows doesn't support regular
 // JavaScript plugins array detection.
 if(isIE && isWin){
   document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
   document.write('on error resume next \n');
   document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
   document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
   document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
   document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
   document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n'); 
   document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
   document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
   document.write('<\/SCR' + 'IPT> \n'); // break up end tag so it doesn't end our script
 }

 function detectFlash() {  
   // If navigator.plugins exists...
   if (navigator.plugins) {
     // ...then check for flash 2 or flash 3+.
     if (navigator.plugins["Shockwave Flash 2.0"]
         || navigator.plugins["Shockwave Flash"]) {
       var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
       var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
       // alert("Flash plugin description: " + flashDescription);
       var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));  
       flash2Installed = flashVersion == 2;    
       flash3Installed = flashVersion == 3;
       flash4Installed = flashVersion == 4;
       flash5Installed = flashVersion == 5;
	   flash6Installed = flashVersion == 6;
	   flash7Installed = flashVersion == 7;
       flash8Installed = flashVersion >= 8;
     }
   }
   
   // Loop through all versions we're checking, and
   // set actualVersion to highest detected version.
   for (var i = 2; i <= maxVersion; i++) {  
     if (eval("flash" + i + "Installed") == true) gotflash = i;
   
   }
 }
 
 detectFlash();  // call our detector now that it's safely loaded.  
 /*  
   var testImg=new Image();
   testImg.src='/vector/testImg/'+gotflash+'.gif';  
*/
 //testing:
 //gotflash=0;
 function printContent(){
 // change this to appropriate required plug-in version.
 var requiredVersion = 6;
 
 if (gotflash >= requiredVersion) {
 	document.write('<!-- Flash Movie -->');
  	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="700" HEIGHT="200" id="light" ALIGN="">');
	document.write('<PARAM NAME=movie VALUE="file:///X8CO HD/Users/x8co/Sites/images/flashBanner.swf">');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=bgcolor VALUE=#1658D2>');
	document.write('<EMBED src="file:///X8CO HD/Users/x8co/Sites/images/flashBanner.swf" quality=high bgcolor=#1658D2  WIDTH="700" HEIGHT="200" NAME="light" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
 
 }

 else {
 document.write('<img src="file:///X8CO HD/Users/x8co/Sites/images/noflash.jpg">');
 }
 }
 // -->

///////////////////////// End Flash Detector /////////////////////////////////////

//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: Jan 1st, 06'
// Web master comments: very good site wit lots of options, easy to customize

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
if (this.ie || this.firefox)
this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
},

iecompattest:function(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
},

dropit:function(obj, e, dropmenuID){
if (this.dropmenuobj!=null) //hide previous menu
this.dropmenuobj.style.visibility="hidden"
this.clearhidemenu()
if (this.ie||this.firefox){
obj.onmouseout=function(){cssdropdown.delayhidemenu()}
this.dropmenuobj=document.getElementById(dropmenuID)
this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
this.dropmenuobj.x=this.getposOffset(obj, "left")
this.dropmenuobj.y=this.getposOffset(obj, "top")
this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
}
},

contains_firefox:function(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
},

dynamichide:function(e){
var evtobj=window.event? window.event : e
if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
this.delayhidemenu()
else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
this.delayhidemenu()
},

delayhidemenu:function(){
this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
},

clearhidemenu:function(){
if (this.delayhide!="undefined")
clearTimeout(this.delayhide)
}
}
function showDivSearch() {
		if (document.getElementById('what').className == 'show_style') { 
			document.getElementById('what').className = 'inv_style';
		} else if (document.getElementById('what').className == 'inv_style') {
			document.getElementById('what').className = 'show_style';
		}
}