/* OPEN POPUP AND FOCUS */
function getId(objectId){if(document.all && !document.getElementById){return document.all(objectId)}else{return document.getElementById(objectId)}}

function openPopupFocus(theURL,winName,features) {
	if ((document.all||document.getElementById) && screen.availWidth > 800){
		features = 'scrollbars=yes,resizable=yes,width='+(screen.availWidth-100)+',height='+(screen.availHeight-100);
	}else if (document.layers||document.getElementById){
		if (screen.availWidth>800){
    		features = 'scrollbars=yes,resizable=yes,width='+(screen.availWidth-100)+',height='+(screen.availHeight-100);
		}
	}
	newwindow=window.open(theURL,winName,features);
	newwindow.moveTo(50,50);
	if (window.focus) {newwindow.focus()}
	return false;
}

// accordion
function accToogle(elem){
	if(elem.parentNode.className=='accExpend'){elem.parentNode.className='accCollapse'}else{elem.parentNode.className='accExpend'}
	var allAccItems = getId('display').getElementsByClassName('accCollapse');
	for (i = 0; i < allAccItems.length; i++) {
		if(allAccItems[i]!==elem.parentNode){allAccItems[i].className = 'accExpend'}
	}
}

// function to resize flv player at runtime (the function is called from flav_player.swf)
function resizeFlash(myWidth,myHeight){
	if(flashDiv=getId("flashMovie")){
		flashDiv.setAttribute("width",myWidth);
		flashDiv.setAttribute("height",myHeight);
		//alert(myWidth+'-'+myHeight);
	}	
}
