/* ------------------------------------------------------------- */
// BEGIN player settings and installations


var current_fid = 0;
var current_trid = 0;


function CompilePlayerFront( trid, fid )
{
	var front = '<a href="#" onclick="ChasePrelisten( \''+trid+'\', \''+fid+'\' );FlipPlayerFront( \''+trid+'\', \''+fid+'\' );return false;">'+
	'<img src="/images/horde/player_front.gif" width="80" height="15" border="0" /></a>';

	return front;
}

function FlipPlayerFront( trid, fid )
{
	//alert( 'Unfortunately, preview feature is unavailable yet.\r\n\r\n'+
	//'Please check back in awhile.' );
	//return;

	var landing = CompilePlayer( trid, fid );
	document.getElementById( 'dip_'+trid ).innerHTML = landing;
}

function CompilePlayer( trid, fid )
{
	var landing = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+
	'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" '+
	'width="80" height="15" id="'+fid+'">' +
	'<param name="movie" value="/images/horde/swf/player_small_v21.swf" />'+
	'<param name="AllowScriptAccess" value="always" />'+
	'<param name="quality" value="high" />'+
	'<param name="flashvars" value="trid='+trid+'&self_fid='+fid+'">'+
	'<embed src="/images/horde/swf/player_small_v21.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" '+
	'flashvars="trid='+trid+'&self_fid='+fid+'" allowScriptAccess="always" type="application/x-shockwave-flash" width="80" height="15"></embed></object>';

	return landing;
}


function InstallPlayer( trid, fid )
{
	var landing = CompilePlayerFront( trid, fid );
	//document.write( landing );

	document.getElementById( 'dip_'+trid ).innerHTML = landing;
}

function ChasePrelisten( trid, fid )
{
	// fid responds to the now-playing player fid
	// *

	if( current_trid < 1 )
	{
		current_trid = trid;
		current_fid = fid;
		return;
	}

	if( current_trid == trid )
		return;

	// flip last fid and update current one
	// *
	try {
	last_player = document.getElementById( fid );
	delete last_player; } catch( e ) { };
	
	
	document.getElementById( 'dip_'+current_trid ).innerHTML = CompilePlayerFront( current_trid, current_fid );
	
	current_trid = trid;
	current_fid = fid;
}

// END
/* ------------------------------------------------------------- */




function OpenPwdLayer()
{
    var layer = document.getElementById( 'id_recover_holder' );
    if( !layer )
    {
        alert( 'unexpected error occured. \r\nplease contact our support team via e-mail.' );
        return;
    }
				
    layer.innerHTML = ''+
    '<div id="blanket" style="display:none;"></div>'+
    '<div id="forgotPwdDiv" style="display:none;">'+
    '<div style="font-weight:600; height:230px; font-family:Verdana; font-size:14px; color:white; line-height: 90%;">'+
    '<div align="right" style="position:relative;top:20px;left:-20px;">'+
    '<input class="comm-btn" style="font-weight: bold;" type="submit" onclick="popup(\'forgotPwdDiv\'); return false;" value="   Close   " /></div>'+
    '<center><div style="padding-bottom: 16px;">&nbsp;</div>'+
    '<iframe src="/forgot-password" width="500" height="150" frameborder="0" scrolling="no"></iframe></center>' + 
    '</div>'+
    '</div>';
    popup( 'forgotPwdDiv' );
}


function PreloadMenu() {}