/*Function for video details page */
function showHide(popupId)
{	
	if(popupId != 1) {
            $('1').hide();
        }
        if(popupId != 2) {
             $('2').hide();
        }
        if(popupId != 3) {
             $('3').hide();
        }
        if(popupId != 4) {
             $('4').hide();
        }
		if(popupId != "twitter") {
             $("twitter").hide();
        }
        if(popupId != "commentDiv"){
        	$("commentDiv").hide();
        }
}  
// For tikiwiki help popup.
// Browser safe opacity handling function

function setOpacity( value ) {
	document.getElementById("styled_popup").style.opacity = value / 10;
	document.getElementById("styled_popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup() {
	for( var i = 0 ; i <= 100 ; i++ )
		setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}

function fadeOutMyPopup() {
	for( var i = 0 ; i <= 100 ; i++ ) {
		setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
	}

	setTimeout('closeMyPopup()', 800 );
}

function closeMyPopup() {
	document.getElementById("styled_popup").style.display = "none"
}

function fireMyPopup() {
	setOpacity( 0 );
	document.getElementById("styled_popup").style.display = "block";
	fadeInMyPopup();
}   
             
