		
		//create flash version var
		var flashVersion = "none";
		
		function flashDetect(){
			
			//does flashversion exist in cookie exist
			if(document.cookie){
				//define function to get value from cookie
				function getFlashVer(){
				 	//define function variables
				 	var arrSplitValues;
				 	var i;
				 	var arrCookie;
				 	var szCookie = document.cookie;
				 	//alert(szCookie);
				 	//create an array of cookie variables
				 	arrCookie = szCookie.split(";");
				 	//loop through cookie variables
				 	for(i=0;i<arrCookie.length;++i) {
				 		//split cookie varaiable into name and value
				    	arrSplitValues = arrCookie[i].split("=");
				    	//if name is flash version
				    	strippedSpaces = arrSplitValues[0].replace(/^\s+/, '');
				    	if(strippedSpaces == 'flashversion'){ 
				    		//set js varaible
				    		flashVersion = arrSplitValues[1];
				    	}
					}
				}
				//call function to get value from cookie
				getFlashVer();
				//alert(flashVersion);
			}
			
			//if not get flash version and set cookie
			if(flashVersion == 'none'){
				function setCookie(){
					//get flash version with swf object
					flashVersionObject = swfobject.getFlashPlayerVersion();
					//set js flashversion var
					flashVersion = flashVersionObject.major;
					//set date
					var exdate = new Date();
					exdate.setDate(exdate.getDate() + 100);
					//add cookie
					document.cookie = "flashversion=" + escape(flashVersion) + ";expires=" + exdate.toGMTString() + ";path=/";
				}
				// call the flash version function to get and set the cookie
				setCookie();
			}
			
			//if flash older than 9 or no flash display get flash button
			/*if(flashVersion < 9){
				//display need flash div
				document.getElementById('needFlashDiv').style.display = 'block';
				//alert('flash dong');
			}*/
		}