/*********************
* Mozilla removeNode
**********************/
if(!window.document.removeNode){
	
Node.prototype.removeNode = function( removeChildren )
{
	var self = this;
	if ( Boolean( removeChildren ) )
	{
		return this.parentNode.removeChild( self );
	}
	else
	{
		var range = document.createRange();
		range.selectNodeContents( self );
		return this.parentNode.replaceChild( range.extractContents(), self );
	}
}

}

/*********************
* General Functions 
**********************/

function changeMenu(menuId){

	arrSb = new Array('search','mainmenu','login')

	for(var i=0;i<arrSb.length;i++){
		divMenu = document.getElementById(arrSb[i]);
		if(divMenu)divMenu.style.display = 'none';
	}

	divMenu = document.getElementById(menuId);
	divMenu.style.display = 'inline';
}

function openAdvert(ID){
	var adWin = window.open("advert.php?id="+ID, "adWindow", "width=420,height=350,status=no,menubar=no,toolbar=no,scrollbars=yes")
}


/*********************
* Advert Entry Forms 
**********************/

function showTip( num ) {
	
	tip = document.getElementById( 'formtip-'+num );
	tip.style.visibility = 'visible';
	
}

function hideTip( num ) {
	
	tip = document.getElementById( 'formtip-'+num );
	tip.style.visibility = 'hidden';
	
}


function openComment( id ) {
	window.open('/makecomment.php?id='+id,'comment',"width=420,height=350,status=no,menubar=no,toolbar=no,scrollbars=yes")
}