// ******************** cookie detect
if(document.cookie.indexOf(category + "=true")>=0) {isCookie = category;}
else {document.cookie = category + "=true; path=/"; isCookie = false;}

// ******************** spam prevention
function contact(user){
 host = "dopei.com"
 window.location.href = "mailto:" + user + "@" + host;
}

// ******************** image popup
var swf;
function zoom(url,h,b,swf){
	sleft=(screen.width)?(screen.width-b)/2:100;
	stop=(screen.height)?(screen.height-h)/2:100;
	zoomer = window.open('','wzoom','width='+b+',height='+h+',top='+stop+',left='+sleft+',resizeable=0,status=0,scrollbars=0,toolbar=0');
	if(swf){zoomer.location.href = url;}
	else{zoomer.location.href = '/zoom.html?' + url;}
}

// ******************** random image 
function rvisual() {
	var rimg;
	var img = Math.round((2-1)*Math.random())+1;
	
	if (img==1){rimg='<img src="incl/img/visual_beny.gif" alt="" width="170" height="193" border="0">';}
	if (img==2){rimg='<img src="incl/img/visual_jo.gif" alt="" width="170" height="193" border="0">';}
	
	return rimg;
}

// ******************** flash detect
function detectFlash() {  
  if (navigator.plugins) {
    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;
      var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
     
      flash2Installed = flashVersion == 2;    
      flash3Installed = flashVersion == 3;
      flash4Installed = flashVersion == 4;
      flash5Installed = flashVersion >= 5;
    }
  }
  
  for (var i = 2; i <= maxVersion; i++) {  
    if (eval("flash" + i + "Installed") == true) actualVersion = i;
  }
  
  if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 3;  
  if (actualVersion >= requiredVersion) isflash = true;
  
}

detectFlash();
