// JavaScript Document

function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
}

function detshow(elemname,idnum)
{
//alert(elemname+" | "+idnum);
if(document.getElementById){
if(document.getElementById(elemname+""+idnum)){
var elem = document.getElementById(elemname+idnum);

//var hdr = document.getElementById("faqHeader"+idnum)
if(elem == null) { 

return; }
if(elem.style.display == "none")
{
//if(hdr != null){hdr.className="faqHeaderOpen";}
elem.style.display = "";
if(document.getElementById("sagj"+idnum)){document.getElementById("sagj"+idnum).style.display = "none";}
if(document.getElementById("sags"+idnum)){document.getElementById("sags"+idnum).style.display = "";}
}
else
{
elem.style.display = "none";
//if(hdr != null){hdr.className="faqHeaderClosed";}
if(document.getElementById("sagj"+idnum)){document.getElementById("sagj"+idnum).style.display = "";}
if(document.getElementById("sags"+idnum)){document.getElementById("sags"+idnum).style.display = "none";}
}
}
//window.event = true;
return false;
}
}

function openYouTube(opener) {
	var returnValue;
	
	// Safari Mobile doesn't have Flash, so we just let the device use the built-in 
	// YouTube viewer.
	if (/(iPhone|iPod)/.test(navigator.userAgent)) returnValue = true;

	else returnValue = hs.htmlExpand(opener, { 
		objectType: 'swf', 
		objectWidth: 620, 
		objectHeight: 485, 
		width: 640, 
		swfOptions: { 
			params: { 
				allowfullscreen: 'true' 
			}
		}, 
		maincontentText: 'You need to upgrade your Flash player' 
	});
	
	return returnValue;
}  
