//------------------------------------------
// Invision Power Board v2.1
// Profile JS File
// (c) 2005 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------



/*--------------------------------------------*/
// Myhome  verion 3.0
/*--------------------------------------------*/

function confirmIgnore() {
var agree=confirm("Are you sure you want to Ignore Him ( or Her )?");
  if (agree)
	return true ;
else
	return false ;

}
function confirmAdd() {
var agree=confirm("Are you sure you want to Add Him (Her ) as Friend ?");
  if (agree)
	return true ;
else
	return false ;

}
function confirmDelete() {
var agree=confirm("Are you sure you want to delete this?");
  if (agree)
	return true ;
else
	return false ;

}

function CheckAll()
{
	var fmobj = document.forms['mutliact'];
	for (var i=0; i<fmobj.elements.length; i++)
	{
		var e = fmobj.elements[i];
		if ((e.name != 'allbox') && (e.type == 'checkbox') && (!e.disabled) && (e.value))
		{
			e.checked = fmobj.elements['allbox'].checked;
		}
	}
}

function toggleuploadmode(file) {
	if (file) {
		document.getElementById('upfile').style.display='block';
		document.getElementById('upurl').style.display='none';
		
	} else {
		document.getElementById('upfile').style.display='none';
		document.getElementById('upurl').style.display='block';
		
	}
}

function focusfield(fl) {
	if (fl.value=="Enter link here") {
		fl.value='';
		//fl.style.color='black';
	}
}

function changeMute(){
Player.settings.mute = 'true';
mute.innerHTML='<a href="#" onClick="changeMute2();">Mute*</a>';
}
function changeMute2(){
Player.settings.mute = 'false';
mute.innerHTML='<a href="#" onClick="changeMute();">Mute</a>';
}
function initiateStation(){
toPlay = document.getElementById('thisStation')
toPlay = toPlay.options[toPlay.options.selectedIndex].value
newRadio = "";
newRadio += "<OBJECT width='380' height='320' ID='Player'  classid='clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'>"
newRadio += "<PARAM name='URL' value='" + toPlay + "' id='insert_1'>"
newRadio += "<PARAM name='uiMode' value='full'>"
newRadio += "<PARAM name='mute' value='false'>"
newRadio += "<PARAM name='ShowControls' value='1'>"
newRadio += "<PARAM name='ShowStatusBar' value='1'>"
newRadio += "<PARAM name='ShowDisplay' value='1'>"
newRadio += "<PARAM name='Volume' value='100'>"
newRadio += "<EMBED type='application/x-mplayer2' "
newRadio += "pluginspage = 'http://www.microsoft.com/Windows/MediaPlayer/' "
newRadio += "SRC='" + toPlay + "' "
newRadio += "name='Player' "
newRadio += "width='380' "
newRadio += "height='320' "
newRadio += "AutoStart='true' "
newRadio += "showcontrols='1' "
newRadio += "showstatusbar='1' "
newRadio += "showdisplay='1' "
newRadio += "id='insert_2'>"
newRadio += "</EMBED>"
newRadio += "</OBJECT>"
document.getElementById('radio').innerHTML = newRadio
}

function updateSourcePage(url){
	if (top.mainWindow){
		if (top.mainWindow.closed){
			top.mainWindow = parent.window.open(url);
			top.mainWindow.opener = this;
		} else {
			top.mainWindow.location = url;
		}
		top.mainWindow.focus();
	} else if ((parent.window.opener == null) || (parent.window.opener.closed)){
		var OriginalWindow = parent.window.open(url);
		OriginalWindow.opener = this;
		OriginalWindow.focus();
	} else {
		parent.window.opener.location = url;
		parent.window.opener.focus();
	}
}
