var sw=0;
var opacity_timer=0;
var opacity_count=0;

//initiate XMLHttpReguest

function changestatus(strURL)
  {
    var xmlHttpReq = false;
    var self = this;
    
	// Mozilla/Safari
    if (window.XMLHttpRequest)
	  {
        self.xmlHttpReq = new XMLHttpRequest();
      }
    // IE
    else if (window.ActiveXObject)
	      {
            self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
          }
		  
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function()
	  {
        if (self.xmlHttpReq.readyState == 4)
		  {
           // updatepage(self.xmlHttpReq.responseText);
          }
      }
    self.xmlHttpReq.send(getquerystring());
  }


function xmlhttpPost(strURL,div,div2,message,sw)
  {
    var xmlHttpReq = false;
    var self = this;
      
    // Mozilla/Safari
    if (window.XMLHttpRequest)
	  {
        self.xmlHttpReq = new XMLHttpRequest();
      }
    // IE
    else if (window.ActiveXObject)
	  {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
      }
    
	self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function()
	  {
        if (self.xmlHttpReq.readyState == 4)
	      {
            if(sw)
			  {												   
			    updatepage(message+self.xmlHttpReq.responseText,div);		
			    if(div2!='')      		
			      updatepage(self.xmlHttpReq.responseText,div2);
			  }
		  }
      }
    self.xmlHttpReq.send(getquerystring());
  }
  
function xmlhttpPost2(strURL)
  {
    var xmlHttpReq = false;
    var self = this;
        
    // Mozilla/Safari
    if (window.XMLHttpRequest)
	  {
        self.xmlHttpReq = new XMLHttpRequest();
      }
    // IE
    else if (window.ActiveXObject)
	  {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
      }
    
	self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function()
	  {
        if (self.xmlHttpReq.readyState == 4)
	      {
		  	  ;
		  }
      }
    self.xmlHttpReq.send(getquerystring());
  }


function getquerystring()
  {
  }

function updatepage(str,div)
  {								
   document.getElementById(div).innerHTML = str;
  }

//some functions for other functions

//START TABS	
function unselectTabs()
  {
	document.getElementById('Overzicht1').className="menuLeft";
	document.getElementById('Overzicht2').className="menuMiddle";
	document.getElementById('Overzicht3').className="menuRight";
	
	document.getElementById('UsedMusic1').className="menuLeft";
	document.getElementById('UsedMusic2').className="menuMiddle";
	document.getElementById('UsedMusic3').className="menuRight";
	
	document.getElementById('Pictures1').className="menuLeft";
	document.getElementById('Pictures2').className="menuMiddle";
	document.getElementById('Pictures3').className="menuRight";
	
	document.getElementById('Tags1').className="menuLeft";
	document.getElementById('Tags2').className="menuMiddle";
	document.getElementById('Tags3').className="menuRight";
	
	document.getElementById('Biografie1').className="menuLeft";
	document.getElementById('Biografie2').className="menuMiddle";
	document.getElementById('Biografie3').className="menuRight";
  }
  
function selectTab(tab)
{					
    unselectTabs();
	document.getElementById(tab+'1').className="menuSelectedLeft";
	document.getElementById(tab+'2').className="menuSelectedMiddle";
	document.getElementById(tab+'3').className="menuSelectedRight";
}			
  
function OverzichtTab()
{
	selectTab("Overzicht");
	xmlhttpPost('show_podcaster_info.php?do=OverzichtTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
}  		  
  							
function PicturesTab()
{
	selectTab("Pictures");
	xmlhttpPost('show_podcaster_info.php?do=PicturesTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
}  				

function BiografieTab()
{
	selectTab("Biografie");	 
	xmlhttpPost('show_podcaster_info.php?do=BiografieTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
}

function deletetag(TagId)
{
	if (confirm('Delete tag?')==1)
	{
		document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
		xmlhttpPost('show_podcaster_info.php?do=deletetag&TagId='+TagId+'&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);		
	}
}

function addtag()
{
	if (document.getElementById('new_tag').value!='')
	{
		var newval=document.getElementById('new_tag').value;
		document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
		xmlhttpPost('show_podcaster_info.php?do=addtag&tag='+newval+'&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);						
	}
}


function friendsview()
{		
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_podcaster_info.php?do=limit_feed&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);		
}

function friendsviewall()
{
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_podcaster_info.php?do=friend_view_all&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);		
}

function xmlfeedview()
{	
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_podcaster_info.php?do=limit_feed&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);						
}

function xmlfeedviewall()
{
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_podcaster_info.php?do=limit_feed_all&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);			
}

function UsedMusicTab()
{
	selectTab("UsedMusic");
	xmlhttpPost('show_podcaster_info.php?do=MusicTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
}  		  	  


function TagsTab()
{
	selectTab("Tags");
	xmlhttpPost('show_podcaster_info.php?do=TagsTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
}		   		  

function refreshReactiesTab(Page)
{		 
	xmlhttpPost('show_listener_info.php?do=RecensiesTab&page='+Page+'&listener_id='+document.getElementById('listener_id').value,'ContentTabs','','',1);
}

//END TABS	
/*

//START REACTIES
			  
function refreshReacties(Page)
{
	xmlhttpPost('show_listener_info.php?do=refreshReacties&page='+Page+'&listener_id='+document.getElementById('listener_id').value,'reactions_table','','',1);	
}		  

//END REACTIES
										 

//START SMALL MENU
 
function showupload_form(visible) 
{								 
	document.getElementById('review_form').style.visibility='hidden';	
	document.getElementById('calendar_window').style.visibility='hidden';			
	document.getElementById('dsp_upload_form').innerHTML='';		
	if ( visible==1 ) {
		xmlhttpPost('show_listener_info.php?do=print_upload_form&listener_id='+document.getElementById('listener_id').value,'dsp_upload_form','','',1);		
		document.getElementById('upload_form').style.visibility='visible';		
 	} else
		document.getElementById('upload_form').style.visibility='hidden';
}									 

function closeUploadForm(page)
  {						    
	if (document.getElementById('selected_tab').value>"Pictures" || document.getElementById('selected_tab').value<"Pictures")
	{
		xmlhttpPost('show_listener_info.php?do=print_upgallery_view&listener_id='+document.getElementById('listener_id').value,'','','',0);	  		
	}
	else 				 
	{
		xmlhttpPost('show_listener_info.php?do=print_upgallery_view&listener_id='+document.getElementById('listener_id').value,'uploadedpictures','','',1);	  				
	}
	showupload_form(0);	
	//xmlhttpPost('artiesten_info.php?do=print_gallery_top','upload_form','','',1)				
  } 
  				
*/  

/// functions bar
function AddAsFriend(visible)
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		xmlhttpPost('small_options.php?action=ACTION_ADD_BUDDY&friendId='+document.getElementById('podcaster_id').value+'&friendType=3','add_friend','','',1);
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=100;				
			setTimeout('showopadd('+9+')',40);
			document.getElementById('window_data').innerHTML=document.getElementById('friend_added').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			//alert(document.getElementById('added_friend').value);
			document.getElementById('window_data').innerHTML=document.getElementById('friend_added').innerHTML;			
		}	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}		
  												  

function sendHeart(visible)
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		xmlhttpPost('small_options.php?action=ACTION_SEND_HEART&UserTo='+document.getElementById('podcaster_id').value+'&UserToType=3','send_heart','','',1);
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=100;				
			setTimeout('showopadd('+9+')',40);
			document.getElementById('window_data').innerHTML=document.getElementById('hearts_sended').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			//alert(document.getElementById('added_friend').value);
			document.getElementById('window_data').innerHTML=document.getElementById('hearts_sended').innerHTML;			
		}	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}		
  	

function AddFavorit(visible)
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		xmlhttpPost('show_podcaster_info.php?do=addfavorite&podcaster_id='+document.getElementById('podcaster_id').value,'add_favorit','','',1);		
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=100;				
			setTimeout('showopadd('+9+')',40);
			document.getElementById('window_data').innerHTML=document.getElementById('favorit_added').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			//alert(document.getElementById('added_friend').value);
			document.getElementById('window_data').innerHTML=document.getElementById('favorit_added').innerHTML;			
		}	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

//START REACTIES
			  
function refreshReacties(Page)
{
	xmlhttpPost('show_podcaster_info.php?do=refreshReacties&page='+Page+'&podcaster_id='+document.getElementById('podcaster_id').value,'reactions_table','','',1);	
}		  

//END REACTIES

function hide_all_divs()
{
	showprivate_msg_form(0);
	showtell_a_friend(0);
	showsend_a_podcast_tip(0);
}

//private_msg
/*function showprivate_msg_form(visible) 
{																				
	if ( visible==1 ) {
		hide_all_divs();			
		document.getElementById('private_msg_data').innerHTML='';				
		document.getElementById('private_msg_form').style.visibility='visible';				
		xmlhttpPost('show_podcaster_info.php?do=getSendPrivateMsg&podcaster_id='+document.getElementById('podcaster_id').value,'private_msg_data','','',1);	  					
 	} 
	else															   
	{
		document.getElementById('private_msg_form').style.visibility='hidden';
		document.getElementById('private_msg_data').innerHTML='';	
	}
}	
*/

function showopadd(opacity_c)
{
	if (opacity_c>0)
	{
		document.getElementById('window').className='windowmain'+opacity_c+'0';	
		opacity_c=opacity_c-2;
		opacity_timer=setTimeout('showopadd('+opacity_c+')',10);
	} else 
	{
		document.getElementById('window').className='windowmain00';	
	}
}

function showopadd2(opacity_c)
{
	if (opacity_c<10)
	{
		document.getElementById('window').className='windowmain'+opacity_c+'0';	
		opacity_c=opacity_c+2;
		opacity_timer=setTimeout('showopadd2('+opacity_c+')',10);
	} else 
	{
		document.getElementById('window').className='windowmain';		
		document.getElementById('window').style.top=-1000;
		document.getElementById('window').style.left=-1000;		
	}
}

function resizeshow(w,h)
{
	/*
	var w2=parseInt(document.getElementById('window').style.width);
	var h2=parseInt(document.getElementById('window').style.height);
	if (w2==w && h2==h)
	{
		;
	} else 
	{
		if (w2>w)
		w2--;
		else if (w2<w)
		w2++;

		if (h2>h)
		h2--;
		else if (h2<h)
		h2++;

		document.getElementById('window').style.width=w2;
		document.getElementById('window').style.height=h2;
		setTimeout('resizeshow('+w+','+h+')',10);
	}
	*/
	document.getElementById('window').style.width=w;
	document.getElementById('window').style.height=h;
}


//private_msg
function showprivate_msg_form(visible) 
{																				
	if ( visible==1 ) {
		//hide_all_divs();	
		show_black();		
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=320;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,320)',10);
		}
		xmlhttpPost('show_podcaster_info.php?do=getSendPrivateMsg&podcaster_id='+document.getElementById('podcaster_id').value,'window_data','','',1);	  					
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	

/*
function showsend_a_podcast_tip(visible)
{
	if ( visible==1 ) {
		hide_all_divs();
		document.getElementById('send_a_podcast_tip_form').style.visibility='visible';								
		xmlhttpPost('show_podcaster_info.php?do=getSendPodcastTip&podcaster_id='+document.getElementById('podcaster_id').value,'send_a_podcast_tip_data','','',1);						
 	} else {
		document.getElementById('send_a_podcast_tip_data').innerHTML='';			
 		document.getElementById('send_a_podcast_tip_form').style.visibility='hidden';	
 	}	
}*/

function showsend_a_podcast_tip(visible)
{
	if ( visible==1 ) {
		//hide_all_divs();			
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=340;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,340)',10);
		}
		xmlhttpPost('show_podcaster_info.php?do=getSendPodcastTip&podcaster_id='+document.getElementById('podcaster_id').value,'window_data','','',1);	  					
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
	} 	
}

function showtell_a_friend(visible)
{
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=340;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,340)',10);
		}
		xmlhttpPost('show_podcaster_info.php?do=getTellaFriend&podcaster_id='+document.getElementById('podcaster_id').value,'window_data','','',1);	  					
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}



/*
function showtell_a_friend(visible)
{
	if ( visible==1 ) {
		hide_all_divs();
		document.getElementById('tell_a_friend_form').style.visibility='visible';								
		xmlhttpPost('show_podcaster_info.php?do=getTellaFriend&podcaster_id='+document.getElementById('podcaster_id').value,'tell_a_friend_data','','',1);						
 	} else {
 		document.getElementById('tell_a_friend_form').style.visibility='hidden';	
		document.getElementById('tell_a_friend_data').innerHTML='';			 		
 	}
}
*/

function showsend_a_music_tip(visible)
{
	if ( visible==1 ) {
		document.getElementById('send_a_music_tip_form').style.visibility='visible';								
		xmlhttpPost('show_listener_info.php?do=getSendMusicTip&podcaster_id='+document.getElementById('podcaster_id').value,'send_a_music_tip_data','','',1);						
 	} else {
		document.getElementById('send_a_music_tip_data').innerHTML='';			
 		document.getElementById('send_a_music_tip_form').style.visibility='hidden';	
 	}	
}


//END SMALL MENU  


function show_comments(LogId)
{
	xmlhttpPost('show_podcaster_info.php?do=getComments&LogId='+LogId+'&podcaster_id='+document.getElementById('podcaster_id').value,'weblog_id','','',1);						
}

function show_weblogs()
{
	xmlhttpPost('show_podcaster_info.php?do=showWeblogs&podcaster_id='+document.getElementById('podcaster_id').value,'weblog_id','','',1);						
}

//Tabs NEW

function unselectTabsNew()
  {
	document.getElementById('overview_1').className="tabLeft";
	document.getElementById('overview_2').className="tabMiddle";
	document.getElementById('overview_3').className="tabRight";
	
	document.getElementById('used_music_1').className="tabLeft";
	document.getElementById('used_music_2').className="tabMiddle";
	document.getElementById('used_music_3').className="tabRight";
	
	document.getElementById('pictures_1').className="tabLeft";
	document.getElementById('pictures_2').className="tabMiddle";
	document.getElementById('pictures_3').className="tabRight";
	
	document.getElementById('tags_1').className="tabLeft";
	document.getElementById('tags_2').className="tabMiddle";
	document.getElementById('tags_3').className="tabRight";
	
	document.getElementById('biography_1').className="tabLeft";
	document.getElementById('biography_2').className="tabMiddle";
	document.getElementById('biography_3').className="tabRight";

	document.getElementById('favartist_1').className="tabLeft";
	document.getElementById('favartist_2').className="tabMiddle";
	document.getElementById('favartist_3').className="tabRight";
	
	
  }
  
function selectTabNew(tab)
  {				   
  	unselectTabsNew();
	document.getElementById(tab+'_1').className="tabLeftSelected";
	document.getElementById(tab+'_2').className="tabMiddleSelected";
	document.getElementById(tab+'_3').className="tabRightSelected";

	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	switch (tab) {
		case 'overview':			
			xmlhttpPost('show_podcaster_info.php?do=limit_feed&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;
		case 'used_music':
			xmlhttpPost('show_podcaster_info.php?do=MusicTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;
		case 'pictures':
			xmlhttpPost('show_podcaster_info.php?do=PicturesTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;
		case 'tags':
			xmlhttpPost('show_podcaster_info.php?do=TagsTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;
		case 'biography':
			xmlhttpPost('show_podcaster_info.php?do=BiografieTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;
		case 'favartist':
			xmlhttpPost('show_podcaster_info.php?do=FavArtistsTab&podcaster_id='+document.getElementById('podcaster_id').value,'ContentTabs','','',1);
		break;		
	}
  }
  
  
function getPageSizeWithScroll(direction)
{     
		if (window.innerHeight && window.scrollMaxY) 
		{
			// Firefox         
			yWithScroll = window.innerHeight + window.scrollMaxY;
			xWithScroll = window.innerWidth + window.scrollMaxX;     
		} else if (document.body.scrollHeight > document.body.offsetHeight)
		{ // all but Explorer Mac         
			yWithScroll = document.body.scrollHeight;         
			xWithScroll = document.body.scrollWidth;     
		} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
			yWithScroll = document.body.offsetHeight;         
			xWithScroll = document.body.offsetWidth;
		}     
		arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
		//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );     
		if (direction=='w')
			return xWithScroll;
		if (direction=='h')
			return yWithScroll;

}

function show_black() {
	
	var elements=document.getElementsByTagName('select');

	for (var i=0; i<elements.length; i++) {		
			elements[i].style.visibility='hidden';
	}	

	document.getElementById('musicplayer').style.visibility='hidden';	
	document.getElementById('skill_skill').style.visibility='hidden';
	
	page_height=getPageSizeWithScroll('h');
	document.getElementById('black_wall').className='black_wall_1';		
	document.getElementById('black_wall').style.height=page_height;		
}

function show_black2() {
	
	var elements=document.getElementsByTagName('select');

	for (var i=0; i<elements.length; i++) {		
			elements[i].style.visibility='hidden';
	}	

	page_height=getPageSizeWithScroll('h');
	document.getElementById('black_wall2').className='black_wall_1';		
	document.getElementById('black_wall2').style.height=page_height;		
}

function hide_black2() {
	var elements=document.getElementsByTagName('select');

	for (var i=0; i<elements.length; i++) {		
			elements[i].style.visibility='visible';
	}				
	
	document.getElementById('black_wall2').className='black_wall_0';			
}

function hide_black() {
	var elements=document.getElementsByTagName('select');

	for (var i=0; i<elements.length; i++) {		
			elements[i].style.visibility='visible';
	}				

	document.getElementById('musicplayer').style.visibility='visible';	
	document.getElementById('skill_skill').style.visibility='visible';
	
	document.getElementById('black_wall').className='black_wall_0';			
}  

function AddBlock(visible,val)
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		xmlhttpPost('show_podcaster_info.php?do=addblock&podcaster_id='+document.getElementById('podcaster_id').value+'&val='+val,'add_block','','',1);		
		document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=470;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=100;				
			setTimeout('showopadd('+9+')',40);
			if (val>0)
				document.getElementById('window_data').innerHTML=document.getElementById('block1').innerHTML;			
			else
				document.getElementById('window_data').innerHTML=document.getElementById('block2').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			//alert(document.getElementById('added_friend').value);
			if (val>0)
				document.getElementById('window_data').innerHTML=document.getElementById('block1').innerHTML;			
			else
				document.getElementById('window_data').innerHTML=document.getElementById('block2').innerHTML;			
		}	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}
var _get=function(id) {
	return document.getElementById(id);
}

function check_menu_search() {
	form=_get('zoekenMenu');
	
	var secureSpace=form.SearchQuery.value.replace(' ', '');
	
	if ((form.SearchQuery.value.length<minSearchWord)||(secureSpace.length<minSearchWord)) {
		alert(searchErrorMsg);
		return false;
	}
	else form.submit();
}