
function enableAlphaImages()
{
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
	if (itsAllGood) {
		for (var i=0; i<document.all.length; i++)
		{
			var obj = document.all[i];
			var bg = obj.currentStyle.backgroundImage;
			var img = document.images[i];
			if (bg && bg.match(/\.png/i) != null) 
			{
				var img = bg.substring(5,bg.length-2);
				var offset = obj.style["background-position"];
				obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"', sizingMethod='crop')";
				obj.style.backgroundImage = "url('images/spacer.gif')";//Ìæ»»Í¸Ã÷PNGµÄÍ¼Æ¬
				obj.style["background-position"] = offset; // reapply
			} else if (img && img.src.match(/\.png$/i) != null) {
				var src = img.src;
				img.style.width = img.width + "px";
				img.style.height = img.height + "px";
				img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')"
				img.src = "images/spacer.gif";//Ìæ»»Í¸Ã÷PNGµÄÍ¼Æ¬
			}
		}
	}
}

function getNavigatorVersion()
{
	var IEVersion = parseFloat(window.navigator.userAgent.substr(window.navigator.userAgent.indexOf("MSIE")+5)); 
	if(navigator.userAgent.indexOf("MSIE")>0)return 1;
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0)return 2;
   if(isSafari=navigator.userAgent.indexOf("Safari")>0)return 3;   
   if(isCamino=navigator.userAgent.indexOf("Camino")>0)return 4;
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0)return 5;
   return 0;

};
function setActiveStyleSheet(title){
	//document.getElementsByTagName("link")[0].href=title;  
	
	//alert(document.getElementsByTagName("link")[0].href);
	var LinkCSS = document.getElementById("LinkCSS");
	LinkCSS.disabled = true;
	LinkCSS.href = title;
	LinkCSS.disabled = false;
} 

function SetActiveCSS()
{
	if ( navigator.userAgent.indexOf("MSIE") > 0 )
	{
		var IEVersion = parseFloat(window.navigator.userAgent.substr(window.navigator.userAgent.indexOf("MSIE")+5)); 
		switch ( IEVersion )
		{
			case 5:
				
				break;
			case 6:
			
				break;
			case 7:
				setActiveStyleSheet("xcon2009_ie7.css");
				break;
			default:
			
				break;
		};
	}else if ( navigator.userAgent.indexOf("Firefox") > 0 ){
		setActiveStyleSheet("xcon2009_firefox.css");
	}
		
};


function HideAllSpeakerDiv()
{
	document.getElementById("ChenChenJeongwookOh").style.display = "none";
	document.getElementById("DiffingBinariesVSAntiDiffing").style.display = "none";
	
	document.getElementById("AseemJakhar").style.display = "none";
	document.getElementById("FightingSpamwithGoD").style.display = "none";
	
	document.getElementById("JohnLambert").style.display = "none";
	document.getElementById("MicrosoftsCounterZeroDayStrategy").style.display = "none";
	
	document.getElementById("FunnyWei").style.display = "none";
	document.getElementById("TheIntroductionOfAToolWhichAnalyzeTheUsabilityOfVulnerability").style.display = "none";
	
	document.getElementById("EduardoVela").style.display = "none";
	document.getElementById("OurFavoriteXSSFiltersAndHowToAttackThem").style.display = "none";
	
	document.getElementById("TieleiWang").style.display = "none";
	document.getElementById("IntegerOverflowVulnerabilityInBinarySystem").style.display = "none";
	
	document.getElementById("XuHao").style.display = "none";
	document.getElementById("AttackTheIdentificationSystemBasedOnTheCertificate").style.display = "none";
	
	document.getElementById("SunBing").style.display = "none";
	document.getElementById("GoDeepIntoTheSecurityOfFirmwareUpdate").style.display = "none";
	
	
	
}

function HideAllXConSpeakerDiv()
{
	document.getElementById("ChenChenJeongwookOh").style.display = "none";
	document.getElementById("DiffingBinariesVSAntiDiffing").style.display = "none";
	
	document.getElementById("AseemJakhar").style.display = "none";
	document.getElementById("FightingSpamwithGoD").style.display = "none";
	
	document.getElementById("JohnLambert").style.display = "none";
	document.getElementById("MicrosoftsCounterZeroDayStrategy").style.display = "none";
	
	document.getElementById("FunnyWei").style.display = "none";
	document.getElementById("TheIntroductionOfAToolWhichAnalyzeTheUsabilityOfVulnerability").style.display = "none";
	
	document.getElementById("EduardoVela").style.display = "none";
	document.getElementById("OurFavoriteXSSFiltersAndHowToAttackThem").style.display = "none";
	
	document.getElementById("TieleiWang").style.display = "none";
	document.getElementById("IntegerOverflowVulnerabilityInBinarySystem").style.display = "none";
	
	document.getElementById("XuHao").style.display = "none";
	document.getElementById("AttackTheIdentificationSystemBasedOnTheCertificate").style.display = "none";
	
	document.getElementById("SunBing").style.display = "none";
	document.getElementById("GoDeepIntoTheSecurityOfFirmwareUpdate").style.display = "none";
	
	
}

function HideClickedDiv(DivID)
{
	document.getElementById(DivID).style.display = "none";
}

function ShowSpeakInforDiv(DivID)
{
	HideAllXConSpeakerDiv();		
	HideAllSpeakerDiv();
	
	ShowDiv = document.getElementById(DivID);
	
	
	ShowDiv.style.display = "block";

	
	if ( ShowDiv.offsetLeft + ShowDiv.offsetWidth > document.body.clientWidth )
	{
		ShowDiv.style.left = document.body.clientWidth - ShowDiv.offsetWidth ;
	}
	
	if ( ShowDiv.offsetTop + ShowDiv.offsetHeight > 1100 )
	{
		ShowDiv.style.top = 1100 - ShowDiv.offsetHeight ;
	}
	
	

}