// JavaScript Document
function accPopup(theURL,winName,features) {
		newwindow=window.open(theURL,winName,features);
		if (window.focus) {newwindow.focus()}
		return false;
}

function setClass(theId,theClass) {
		if (document.getElementById) {
				var e = document.getElementById(theId);
				e.className = theClass;
		}
		return false;
}

function accImgPopup(theURL,theW,theH) {
		if (typeof imgWin!='undefined') imgWin.close();
		//var theT = ',top='+(Math.floor((screen.availHeight-eval(theH)-10)/2));
		//var theL = ',left='+(Math.floor((screen.availWidth-eval(theW))/2));
		var features = 'width='+theW+',height='+theH+',top=20,left=20';
		newWindow=window.open(theURL,'imgWin',features);
		newWindow.document.open();
		newWindow.document.write('<html><head><title>webKatalog</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style>body{margin:0;padding:0;}</style></head><body onblur="self.close();">'); 
		newWindow.document.write('<a href="javascript:self.close();"><img src="'+theURL+'" width="'+theW+'" height="'+theH+'" galleryimg="no" id="theImg" border="0"></a>');
		newWindow.document.write('</body></html>');
		newWindow.document.close();
		if (window.focus) {newWindow.focus()}
		return false;
}

function showHide(targ) {
	if (document.getElementById) {
		targ = document.getElementById(targ);
		if (targ.className=='hidden') {
			targ.className='shown';
		} else {
			targ.className='hidden';
		}
		//return false;
	}
}

function showHideNav(targ) {
	if (document.getElementById) {
		targ = document.getElementById(targ);
		if (targ.className=='selected') {
			targ.className='';
		} else {
			targ.className='selected';
		}
		return false;
	}
}

function showHideTabs(targ) {
	if (!window.curActive) window.curActive = 'video';
	if (document.getElementById) {
		oldTarg = document.getElementById(window.curActive);
		oldTargContent = document.getElementById("content_"+window.curActive);
		window.curActive = targ;
		targContent = document.getElementById("content_"+targ);
		targ = document.getElementById(targ);
		oldTargContent.className = 'hidden';
		oldTarg.className = '';
		targ.className = 'selected';
		targContent.className = 'shown';
		return false;
	}
}

function changeTrack(fileName,callerId,useFX) {
	if (window.curActId!=callerId) {
	if (window.curActItem) { 
		var old_className = window.curActItem.className;
		if (old_className.indexOf('entry_playable')>0) {
			window.curActItem.className = "entry entry_playable"; 
		} else {
			window.curActItem.className = "entry"; 
		}
		if (window.fxUsed===true) new Effect.BlindUp('entrydetails'+window.curActId); 
	}
	if (fileName!='') {
		//window.flashProxy.call('setFileName', fileName);
		var flash = (navigator.appName.indexOf ("Microsoft") !=-1)?window["streamingplayer"]:document["streamingplayer"]; 
		flash.setFileName(fileName);
	}
	targ = document.getElementById('entry'+callerId);
	targ2 = targ.getElementsByTagName('a');
	targ2[0].blur();
	window.fxUsed = false;
	if (useFX!=0) window.fxUsed = true;
	window.curActItem = targ;
	window.curActId = callerId;
	window.curActItem.className = 'entry selected';
	if (fileName=='') window.curActItem.className = 'entry selected selected_nofile';
	if (useFX!=0) new Effect.BlindDown('entrydetails'+callerId);
	}
	
}

function changeTrack2(fileName,callerId,useFX) {
	if (window.curActId!=callerId) {
	if (window.curActItem) { 
		var old_className = window.curActItem.className;
		if (old_className.indexOf('entry_playable')>0) {
			window.curActItem.className = "entry entry_playable"; 
		} else {
			window.curActItem.className = "entry"; 
		}
		if (window.fxUsed===true) new Effect.BlindUp('entrydetails'+window.curActId); 
	}
	if (fileName!='') {
		var flash = (navigator.appName.indexOf ("Microsoft") !=-1)?window["streamingplayer_video"]:document["streamingplayer_video"]; 
		flash.setFileName(fileName); 		
	}
	targ = document.getElementById('entry'+callerId);
	targ2 = targ.getElementsByTagName('a');
	targ2[0].blur();
	window.fxUsed = false;
	if (useFX!=0) window.fxUsed = true;
	window.curActItem = targ;
	window.curActId = callerId;
	window.curActItem.className = 'entry selected';
	if (fileName=='') window.curActItem.className = 'entry selected selected_nofile';
	if (useFX!=0) new Effect.BlindDown('entrydetails'+callerId);
	}
	
}


function showDetails(callerId,useFX) {
	if (window.curActId!=callerId) {
	if (window.curActItem) { window.curActItem.className = "entry"; if (window.fxUsed===true) new Effect.BlindUp('entrydetails'+window.curActId); }
	targ = document.getElementById('entry'+callerId);
	targ2 = targ.getElementsByTagName('a');
	targ2[0].blur();
	window.fxUsed = false;
	if (useFX!=0) window.fxUsed = true;
	window.curActItem = targ;
	window.curActId = callerId;
	window.curActItem.className = 'entry selected';
	if (useFX!=0) new Effect.BlindDown('entrydetails'+callerId);
	}
}
