var sw=0;
var contor=0;
var gallery_page=1;
var info_concert_id=0;
var info_Log_id=0;
var info_Video_id=0;
var album_id;
var concert_plats_changed=0;
var timeout = null;	 
var timeout2 = null;
var buffer = '';

//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

function randomString() 
  {
	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
	var string_length = 8;
	var randomstring = '';
	for (var i=0; i<string_length; i++)
	  {
		var rnum = Math.floor(Math.random() * chars.length);
		randomstring += chars.substring(rnum,rnum+1);
	  }
	return randomstring;
}


function addDiv(x,y)
  {
    var body = document.body;
    var newDiv = document.createElement("div");
	var nr=document.getElementById('number').innerHTML;
    newDiv.innerHTML = nr;
	newDiv.setAttribute("id", "nr");		
    body.appendChild(newDiv); 	
    newDiv.style.cssText="bgOpacity:0.5; toggle:fade; toggleDuration:250;color: white;background-color: black;position: absolute; width: 10px; height: 20px; z-index: 1; left: "+x+"px; top: "+y+"px";
	
  }
   
function infoLoad(page,div_id)
  {
	if(sw==0)
	  {
		xmlhttpPost(page,div_id,'','',1);
	    sw=0;	
	  }
  }
 
 
//START  EDIT NAME
function editForm(page,form_id,save_id,artist_id)
  {
	if(sw==0)
	  {
		xmlhttpPost(page,form_id,'','',1);
		document.getElementById(save_id).innerHTML="<input type='button' value='Save' onclick=saveName('"+form_id+"','"+save_id+"','"+artist_id+"')>";	    
	    sw=0;	
	  }
  }
 
function saveName(form_id,save_id,artist_id)
  {    
	var name_id, new_name;
	name_id='id_'+form_id;
	
	new_name=document.getElementById(name_id).value;
	new_name=new_name.replace(/ /g,'**');
	
	xmlhttpPost('artiesten_info.php?do=save_name&name='+new_name,'','','',0);
	document.getElementById(form_id).innerHTML="<h1>"+document.getElementById(name_id).value+"</h1>";
	document.getElementById(save_id).innerHTML="<img src='img/artists/modify.png'><a href=# onclick=\"editForm('artiesten_info.php?do=print_form&artist_id="+artist_id+"&nr=1&div1=ArtiestTitel','ArtiestTitel','changeArtistName','"+artist_id+"')\">wijzig artiestennaam</a>";
  }
  
//END EDIT NAME  
  
function selectImage(image)
  {
	xmlhttpPost('artiesten_info.php?do=save_main_image&image='+image,'','','',0);
	document.getElementById('show_main_photo').src = "./images/"+image;
  }
  
function loadArtistData()
  {
	if(sw==0)
	  {
		xmlhttpPost('artiesten_info.php?do=print_artist_data','artistDataLoc','','',1);
	    sw=0;	
	  }
  }
  
function editDataForm()
  {
	if(sw==0)
	  {
		xmlhttpPost('artiesten_info.php?do=print_data_form&div=artistDataLoc','artistDataLoc','','',1);
		document.getElementById('changeArtistData').innerHTML="<input type='button' value='Save' onclick=saveDataForm()>";	    
	    sw=0;	
	  }
  }
  
function saveDataForm()
  { 
    var Genre1ID=document.getElementById('Genre1ID').value;
	var Genre2ID=document.getElementById('Genre2ID').value;
	var ArtiestWoonplaats=document.getElementById('ArtiestWoonplaats').value;
	var ArtistRegion=document.getElementById('ArtistRegion').value;
	var ArtiestLand=document.getElementById('ArtiestLand').value;
	var ArtistWebsite=document.getElementById('ArtistWebsite').value;
	
	document.getElementById('changeArtistData').innerHTML="<img src='img/artists/modify.png'><a href='#' onclick=editDataForm('artistDataLoc','changeArtistData')>wijzig gegevens</a>";	
	
	xmlhttpPost('artiesten_info.php?do=save_data&Genre1ID='+Genre1ID+'&Genre2ID='+Genre2ID+'&ArtiestWoonplaats='+ArtiestWoonplaats+'&ArtistRegion='+ArtistRegion+'&ArtiestLand='+ArtiestLand+'&ArtistWebsite='+ArtistWebsite,'artistDataLoc','','',1);	
  }
  
function addImageForm()
  {
	document.getElementById('newImageForm').style.height= '100px';
	document.getElementById('newImageForm').style.visibility= 'visible';
	document.getElementById('addNewImage').style.visibility= 'hidden'; 
	xmlhttpPost('artiesten_info.php?do=add_image_form','newImageForm','','',1);	
  }
  
function editImageForm(ImageID)
  {
	document.getElementById('newImageForm').style.height= '100px';
	document.getElementById('newImageForm').style.visibility= 'visible';
	document.getElementById('addNewImage').style.visibility= 'hidden'; 
	xmlhttpPost('artiesten_info.php?do=edit_image_form&image_id='+ImageID,'newImageForm','','',1);	
  } 
  
function deleteImage(ImageID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_image&image_id='+ImageID+'&page='+gallery_page,'slider','','',1);	  
  }
  
function closeImageForm()
  {	
    xmlhttpPost('artiesten_info.php?do=print_gallery&page='+gallery_page,'slider','','',1);	  
	document.getElementById('newImageForm').innerHTML= '';
	document.getElementById('newImageForm').style.height= '0px';
	document.getElementById('newImageForm').style.visibility= 'hidden';
	document.getElementById('addNewImage').style.visibility= 'visible'; 
	xmlhttpPost('artiesten_info.php?do=print_gallery&page='+gallery_page,'slider','','',1);	  

  }  
  
function addConcertForm()
  {
	document.getElementById('newConcertForm').style.height='160px';
	document.getElementById('newConcertForm').style.visibility= 'visible';
	document.getElementById('addNewConcert1').style.visibility= 'hidden'; 
	document.getElementById('addNewConcert2').style.visibility= 'hidden'; 
	document.getElementById('saveNewConcert').style.visibility= 'visible'; 
	xmlhttpPost('artiesten_info.php?do=add_concert_form','newConcertForm','','',1);	
	document.getElementById('saveNewConcert').innerHTML="<input type='button' value='Save' onclick=closeConcertForm(1)>&nbsp;<input type='button' value='Cancel' onclick=closeConcertForm(0)>";	
  }
  
function closeConcertForm(sw)
  {
	var ConcertDate;
	var ConcertLocation;
	var ConcertCosts;
	var ConcertLineup;
	var ConcertPlace;
	var ConcertInfo;

	if(sw==1) 
	  {
	    ConcertDate =document.getElementById('ConcertDate').value;
		ConcertLocation =document.getElementById('ConcertLocation').value;
	    ConcertCosts=document.getElementById('ConcertCosts').value;
	    ConcertLineup=document.getElementById('ConcertLineup').value;
	    ConcertPlace=document.getElementById('ConcertPlace').value;
	    ConcertInfo=document.getElementById('ConcertInfo').value;

        xmlhttpPost('artiesten_info.php?do=save_concert&ConcertDate='+ConcertDate+'&ConcertPlace='+ConcertPlace+'&ConcertCosts='+ConcertCosts+'&ConcertLineup='+ConcertLineup+'&ConcertLocation='+ConcertLocation+'&ConcertInfo='+ConcertInfo,'artistConcerts','','',1);	  
	  
	  }
	  
	document.getElementById('newConcertForm').innerHTML= '';
	document.getElementById('newConcertForm').style.height='0px';
	document.getElementById('newConcertForm').style.visibility= 'hidden';
	document.getElementById('saveNewConcert').style.visibility= 'hidden'; 
	document.getElementById('addNewConcert1').style.visibility= 'visible'; 
	document.getElementById('addNewConcert2').style.visibility= 'visible'; 
  }  
  
function saveEditConcert(i,sw)
  {
	var ConcertDate;
	var ConcertLocation;
	var ConcertCosts;
	var ConcertLineup;
	var ConcertPlace;
	var ConcertInfo;
	var ConcertID;
    var	concert_info_div;
	
	concert_info_div="concert"+i;

	if(sw==1) 
	  {
		  
	    ConcertDate=document.getElementById('ConcertDate').value;
		ConcertLocation=document.getElementById('ConcertLocation').value;
	    ConcertCosts=document.getElementById('ConcertCosts').value;
	    ConcertLineup=document.getElementById('ConcertLineup').value;
	    ConcertPlace=document.getElementById('ConcertPlace').value;
	    ConcertInfo=document.getElementById('ConcertInfo').value;
		ConcertID=document.getElementById('ConcertID').value;

        xmlhttpPost('artiesten_info.php?do=save_edit_concert&ConcertDate='+ConcertDate+'&ConcertPlace='+ConcertPlace+'&ConcertCosts='+ConcertCosts+'&ConcertLineup='+ConcertLineup+'&ConcertLocation='+ConcertLocation+'&ConcertInfo='+ConcertInfo+'&ConcertID='+ConcertID,'artistConcerts','','',1);	   
	  
	  }
	  
	document.getElementById(concert_info_div).innerHTML="";
	document.getElementById(concert_info_div).style.height=0;
	document.getElementById(concert_info_div).style.visibility= 'hidden';
	info_concert_id=0;
  }
 
function deleteConcert(ConcertID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_concert&concertID='+ConcertID,'artistConcerts','','',1);	  
  }   
 
 
function editConcert(ConcertID,n,i)
  {
	var concert_info_div,j;
		
	
	for(j=1;j<=n;j++)
	  {
	    concert_info_div="concert"+j;
		
		if(i==j)
		  {	  		   
			
			if(i!=info_concert_id)
			  {
			    document.getElementById(concert_info_div).style.height=190;
	            document.getElementById(concert_info_div).style.visibility= 'visible';
	            xmlhttpPost('artiesten_info.php?do=edit_concert_form&concertID='+ConcertID+'&i='+i,concert_info_div,'','',1);		
			    info_concert_id=i;
			  }
			else
			  {
				info_concert_id=0;
				document.getElementById(concert_info_div).innerHTML="";
			    document.getElementById(concert_info_div).style.height=0;
	            document.getElementById(concert_info_div).style.visibility= 'hidden';
			    
			  }  
		  }
		else
		  {			

			document.getElementById(concert_info_div).innerHTML="";
			document.getElementById(concert_info_div).style.height=0;
	        document.getElementById(concert_info_div).style.visibility= 'hidden';
		  }
	  }
  } 
  
  
/*  
function infoConcert(ConcertID,n,i)
  {
	var concert_info_div,j;
	
	for(j=1;j<=n;j++)
	  {
	    concert_info_div="concert"+j;
				
		if(i==j)
		  {	  		   
			if(i!=info_concert_id)
			  {
			    document.getElementById(concert_info_div).style.height=160;
	            document.getElementById(concert_info_div).style.visibility= 'visible';
		        xmlhttpPost('show_artiest_info.php?do=info_concert_form&concertID='+ConcertID,concert_info_div,'','',1);	
			    info_concert_id=i;
			  }
			else
			  {
				info_concert_id=0;
				document.getElementById(concert_info_div).innerHTML="";
			    document.getElementById(concert_info_div).style.height=0;
	            document.getElementById(concert_info_div).style.visibility= 'hidden';
			    
			  }
		  }
		else
		  {			
			document.getElementById(concert_info_div).innerHTML="";
			document.getElementById(concert_info_div).style.height=0;
	        document.getElementById(concert_info_div).style.visibility= 'hidden';
		  }
	  }	
  } 	 
  */
 
 
//images
function nextImages(page)
  {	  
	if (page>0)
		xmlhttpPost('show_artiesten_info.php?do=print_gallery&page='+page+'&artist_id='+document.getElementById('artist_id').value,'mypictures','','',1);
  }

function nextUpImages(page)
  {	  
	if (page>0)
		xmlhttpPost('show_artiesten_info.php?do=print_upgallery&page='+page+'&artist_id='+document.getElementById('artist_id').value,'myuploadedpictures','','',1);
  }
  
function prevImages(page)
  {	 
	if (page>0)
		xmlhttpPost('show_artiesten_info.php?do=print_gallery&page='+page+'&artist_id='+document.getElementById('artist_id').value,'mypictures','','',1);
  }
  
function prevUpImages(page)
  {	 
	if (page>0)
		xmlhttpPost('show_artiesten_info.php?do=print_upgallery&page='+page+'&artist_id='+document.getElementById('artist_id').value,'myuploadedpictures','','',1);
  }

//images
  
  
function addAlbumFrame()
  {
	 document.getElementById('playerMainContent').style.height='190px';
	 document.getElementById('playerMainContent').innerHTML="<IFRAME SRC=\"iframe_album_nieuwe.php\" style=\"width: 380px; height: 190px;\" border=\"0\" frameborder=\"0\"></IFRAME>";  
  }
  
function addTrackFrame()
  {
	 document.getElementById('playerMainContent').style.height='190px';
	 document.getElementById('playerMainContent').innerHTML="<IFRAME SRC=\"iframe_track_nieuwe.php?album_id="+album_id+"\" style=\"width: 380px; height: 190px;\" border=\"0\" frameborder=\"0\"></IFRAME>";  
  }
  
function musicplayer_albums()
  {	
	document.getElementById('playerMainContent').innerHTML="<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=\"javascript:addAlbumFrame()\">Add new album</a>";  
		
	document.getElementById('tracks').className="musicplayer_tracks_barTracks";
	document.getElementById('musicPlayer').className="musicplayer_albums";
	document.getElementById('tracks').innerHTML="";
	document.getElementById('albums').className="musicplayer_tracks_barAlbumsSelected";
	//document.getElementById('musicPlayer').innerHTML="Albums"; 
	document.getElementById('AlbumImage').innerHTML="";
	document.getElementById('AlbumTitle').innerHTML="";

	xmlhttpPost('artiesten_info.php?do=list_albums','musicPlayer','','',1);
	
	
  }
  
function musicplayer_tracks(AlbumID,AlbumTitle,AlbumCover)
  {
	album_id=AlbumID;
	document.getElementById('playerMainContent').innerHTML="<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=\"javascript:addTrackFrame()\">Add new track</a>";  
	
	document.getElementById('tracks').className="musicplayer_tracks_barTracksSelected";
	document.getElementById('musicPlayer').className="musicplayer_tracks";
	document.getElementById('AlbumImage').innerHTML="<img src=\"images/"+AlbumCover+"\" style=\"margin-top: 5px;\">";
	document.getElementById('AlbumTitle').innerHTML=AlbumTitle;
	document.getElementById('albums').className="musicplayer_tracks_barAlbums";
	document.getElementById('albums').innerHTML="<a class=\"musicplayer_tracks_barTracks\" href=javascript:musicplayer_albums()></a>"; 
	
	xmlhttpPost('artiesten_info.php?do=list_tracks&album_id='+AlbumID,'musicPlayer','','',1);
	
  }
 
function editAlbumForm(AlbumID)
  {
	document.getElementById('playerMainContent').style.height='190px';
	document.getElementById('playerMainContent').innerHTML="<IFRAME SRC=\"iframe_album_nieuwe.php?album_id="+AlbumID+"\" style=\"width: 380px; height: 190px;\" border=\"0\" frameborder=\"0\"></IFRAME>";

  } 
  
function deleteAlbum(AlbumID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_album&album_id='+AlbumID,'musicPlayer','','',1);	  
  } 
  
  
function editTrackForm(trackID)
  {
	document.getElementById('playerMainContent').style.height='190px';
	document.getElementById('playerMainContent').innerHTML="<IFRAME SRC=\"iframe_track_nieuwe.php?track_id="+trackID+"\" style=\"width: 380px; height: 190px;\" border=\"0\" frameborder=\"0\"></IFRAME>";

  } 
  
function deleteTrack(trackID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_track&track_id='+trackID+'&album_id='+album_id,'musicPlayer','','',1);	  
  } 
  
function closeAlbumForm(sw)
  {       
	var msg;
	if(sw)
	  msg="Album was saved.";
	else
	  msg="";
	
	xmlhttpPost('artiesten_info.php?do=list_albums','musicPlayer','','',1);	  
	document.getElementById('playerMainContent').style.height='50px';	
	document.getElementById('playerMainContent').innerHTML= '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+msg+' <a href=javascript:addAlbumFrame()>Add new album</a>.';
  }  


function closeTrackForm(sw)
  {       
	var msg;
	if(sw)
	  msg="Track was saved.";
	else
	  msg="";
	
	xmlhttpPost('artiesten_info.php?do=list_tracks','musicPlayer','','',1);	  
	document.getElementById('playerMainContent').style.height='50px';	
	document.getElementById('playerMainContent').innerHTML= '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+msg+' <a href=javascript:addTrackFrame()>Add new track</a>.';
  }

//TABS
function unselectTabs()
  {
	document.getElementById('Overzicht1').className="menuLeft";
	document.getElementById('Overzicht2').className="menuMiddle";
	document.getElementById('Overzicht3').className="menuRight";
	
	document.getElementById('Recensies1').className="menuLeft";
	document.getElementById('Recensies2').className="menuMiddle";
	document.getElementById('Recensies3').className="menuRight";
	
	document.getElementById('Podcasts1').className="menuLeft";
	document.getElementById('Podcasts2').className="menuMiddle";
	document.getElementById('Podcasts3').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";
	
	document.getElementById('Interview1').className="menuLeft";
	document.getElementById('Interview2').className="menuMiddle";
	document.getElementById('Interview3').className="menuRight";
	

  }
  
function selectTab(tab)
  {				   
  	document.getElementById('selected_tab').value=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('artiesten_info.php?do=OverzichtTab','ContentTabs','','',1);
  }
  
  
  
function PodcastsTab()
  {
	selectTab("Podcasts");
	xmlhttpPost('show_artiesten_info.php?do=PodcastsTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
  
  
function TagsTab()
  {
	selectTab("Tags");
	xmlhttpPost('artiesten_info.php?do=TagsTab','ContentTabs','','',1);
  }
  
  
function BiografieTab()
  {
	selectTab("Biografie");
	xmlhttpPost('show_artiesten_info.php?do=BiografieTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
 
 
function editBiografieForm()
  {
	xmlhttpPost('artiesten_info.php?do=edit_biografie_form','ContentTabs','','',1);	
  } 
  
  
function closeBiografieForm()
  {	
	var Biografie;
	
	Biografie=document.getElementById('BiografieEdit').value;
	xmlhttpPost('artiesten_info.php?do=saveBiografie&biografie='+Biografie,'ContentTabs','','',1);
  }  
  
  
  
function InterviewTab()
  {
	selectTab("Interview");
	xmlhttpPost('show_artiesten_info.php?do=InterviewTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
  
  //////////////////////////////// WEBLOG///////////////////////////////////////////////////////////
  
		
		
		function addLogForm()
  {
	document.getElementById('newLogForm').style.height='250px';
	document.getElementById('newLogForm').style.visibility= 'visible';
	document.getElementById('addNewLog1').style.visibility= 'hidden'; 
	document.getElementById('addNewLog2').style.visibility= 'hidden'; 
	document.getElementById('saveNewLog').style.visibility= 'visible'; 
	xmlhttpPost('artiesten_info.php?do=add_Log_form','newLogForm','','',1);	
	document.getElementById('saveNewLog').innerHTML="<input type='button' value='Save' onclick=closeLogForm(1)>&nbsp;<input type='button' value='Cancel' onclick=closeLogForm(0)><br><br>";	
  }
  
function closeLogForm(sw)
  {
	var LogTitle;
	var LogText;

	if(sw==1) 
	  {
	    LogTitle=document.getElementById('LogTitle').value;
		LogText=document.getElementById('LogText').value;

        xmlhttpPost('artiesten_info.php?do=save_Log&LogTitle='+LogTitle+'&LogText='+LogText,'artistLogs','','',1);	  
	  
	  }
	  
	document.getElementById('newLogForm').innerHTML= '';
	document.getElementById('newLogForm').style.height='0px';
	document.getElementById('newLogForm').style.visibility= 'hidden';
	document.getElementById('saveNewLog').style.visibility= 'hidden'; 
	document.getElementById('addNewLog1').style.visibility= 'visible'; 
	document.getElementById('addNewLog2').style.visibility= 'visible'; 
  }  
  
function saveEditLog(i,sw)
  {
	var LogTitle;
	var LogText;
	var LogID;	
    var	Log_info_div;
	
	Log_info_div="Log"+i;

	if(sw==1) 
	  {
		  
	    LogTitle=document.getElementById('LogTitle').value;
		LogText=document.getElementById('LogText').value;
		LogID=document.getElementById('LogID').value;

        xmlhttpPost('artiesten_info.php?do=save_edit_Log&LogTitle='+LogTitle+'&LogText='+LogText+'&LogID='+LogID,'artistLogs','','',1);	   
	  
	  }
	  
	document.getElementById(Log_info_div).innerHTML="";
	document.getElementById(Log_info_div).style.height=0;
	document.getElementById(Log_info_div).style.visibility= 'hidden';
	info_Log_id=0;
  }
 
function deleteLog(LogID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_Log&LogID='+LogID,'artistLogs','','',1);	  
  }   
 
 
function editLog(LogID,n,i)
  {
	var Log_info_div,j;
		
	
	for(j=1;j<=n;j++)
	  {
	    Log_info_div="Log"+j;
		
		if(i==j)
		  {	  		   
			
			if(i!=info_Log_id)
			  {
			    document.getElementById(Log_info_div).style.height=280;
	            document.getElementById(Log_info_div).style.visibility= 'visible';
	            xmlhttpPost('artiesten_info.php?do=edit_Log_form&LogID='+LogID+'&i='+i,Log_info_div,'','',1);		
			    info_Log_id=i;
			  }
			else
			  {
				info_Log_id=0;
				document.getElementById(Log_info_div).innerHTML="";
			    document.getElementById(Log_info_div).style.height=0;
	            document.getElementById(Log_info_div).style.visibility= 'hidden';
			    
			  }  
		  }
		else
		  {			

			document.getElementById(Log_info_div).innerHTML="";
			document.getElementById(Log_info_div).style.height=0;
	        document.getElementById(Log_info_div).style.visibility= 'hidden';
		  }
	  }
  } 
  
  /////////////////////////////////////////////////////////////////////////////////////////////
  
  
  
   //////////////////////////////// VIDEOS///////////////////////////////////////////////////////////
  
		
		
		function addVideoForm()
  {
	document.getElementById('newVideoForm').style.height='170px';
	document.getElementById('newVideoForm').style.visibility= 'visible';
	document.getElementById('addNewVideo1').style.visibility= 'hidden'; 
	document.getElementById('addNewVideo2').style.visibility= 'hidden'; 
	document.getElementById('saveNewVideo').style.visibility= 'visible'; 
	xmlhttpPost('artiesten_info.php?do=add_Video_form','newVideoForm','','',1);	
	document.getElementById('saveNewVideo').innerHTML="<input type='button' value='Save' onclick=closeVideoForm(1)>&nbsp;<input type='button' value='Cancel' onclick=closeVideoForm(0)><br><br>";	
  }
  
function closeVideoForm(sw)
  {
	var VideoLink;


	if(sw==1) 
	  {
	    VideoLink=document.getElementById('VideoLink').value;
        xmlhttpPost('artiesten_info.php?do=save_Video&VideoLink='+VideoLink,'artistVideos','','',1);	  
	  
	  }
	  
	document.getElementById('newVideoForm').innerHTML= '';
	document.getElementById('newVideoForm').style.height='0px';
	document.getElementById('newVideoForm').style.visibility= 'hidden';
	document.getElementById('saveNewVideo').style.visibility= 'hidden'; 
	document.getElementById('addNewVideo1').style.visibility= 'visible'; 
	document.getElementById('addNewVideo2').style.visibility= 'visible'; 
  }  
  
function saveEditVideo(i,sw)
  {
	var VideoLink;
	var VideoID;	
    var	Video_info_div;
	
	Video_info_div="Video"+i;

	if(sw==1) 
	  {
		  
	    VideoLink=document.getElementById('VideoLink').value;
		VideoID=document.getElementById('VideoID').value;

        xmlhttpPost('artiesten_info.php?do=save_edit_Video&VideoLink='+VideoLink+'&VideoID='+VideoID,'artistVideos','','',1);	   
	  
	  }
	  
	document.getElementById(Video_info_div).innerHTML="";
	document.getElementById(Video_info_div).style.height=0;
	document.getElementById(Video_info_div).style.visibility= 'hidden';
	info_Video_id=0;
  }
 
function deleteVideo(VideoID)
  {
	xmlhttpPost('artiesten_info.php?do=delete_Video&VideoID='+VideoID,'artistVideos','','',1);	  
  }   
 
 
function editVideo(VideoID,n,i)
  {
	var Video_info_div,j;
		
	
	for(j=1;j<=n;j++)
	  {
	    Video_info_div="Video"+j;
		
		if(i==j)
		  {	  		   
			
			if(i!=info_Video_id)
			  {
			    document.getElementById(Video_info_div).style.height=230;
	            document.getElementById(Video_info_div).style.visibility= 'visible';
	            xmlhttpPost('artiesten_info.php?do=edit_Video_form&VideoID='+VideoID+'&i='+i,Video_info_div,'','',1);		
			    info_Video_id=i;
			  }
			else
			  {
				info_Video_id=0;
				document.getElementById(Video_info_div).innerHTML="";
			    document.getElementById(Video_info_div).style.height=0;
	            document.getElementById(Video_info_div).style.visibility= 'hidden';
			    
			  }  
		  }
		else
		  {			

			document.getElementById(Video_info_div).innerHTML="";
			document.getElementById(Video_info_div).style.height=0;
	        document.getElementById(Video_info_div).style.visibility= 'hidden';
		  }
	  }
  } 
  
  /////////////////////////////////////////////////////////////////////////////////////////////
 
 
function editConcert(ConcertID,n,i)
  {
	var concert_info_div,j;
		
	
	for(j=1;j<=n;j++)
	  {
	    concert_info_div="concert"+j;
		
		if(i==j)
		  {	  		   
			
			if(i!=info_concert_id)
			  {
			    document.getElementById(concert_info_div).style.height=190;
	            document.getElementById(concert_info_div).style.visibility= 'visible';
	            xmlhttpPost('artiesten_info.php?do=edit_concert_form&concertID='+ConcertID+'&i='+i,concert_info_div,'','',1);		
			    info_concert_id=i;
			  }
			else
			  {
				info_concert_id=0;
				document.getElementById(concert_info_div).innerHTML="";
			    document.getElementById(concert_info_div).style.height=0;
	            document.getElementById(concert_info_div).style.visibility= 'hidden';
			    
			  }  
		  }
		else
		  {			

			document.getElementById(concert_info_div).innerHTML="";
			document.getElementById(concert_info_div).style.height=0;
	        document.getElementById(concert_info_div).style.visibility= 'hidden';
		  }
	  }
  }   

  
////////////////////////////////////
//zoli
////////////////////////////////////

function getconcertinfo(ConcertID,Expand,ID,div)
{				 												 
	if(ConcertID>0)
	  {													 
		xmlhttpPost('concerten.php?ID='+ID+'&ConcertID='+ConcertID+'&Expand='+Expand,div,'','',1);
	  }
}  			   
				   
function load_concert_page( page_nr, GenreID, Plaats, ProvincieID, artist, div )
{								  
	if(page_nr>0)
	  {	
	  	document.getElementById(div).innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('concerten.php?page_nr='+page_nr+'&GenreID='+GenreID+'&Plaats='+Plaats+'&ProvincieID='+ProvincieID+'&artist='+artist,div,'','',1);
	  }	
}
																   
function concert_filter_artist(text,div)
{  									   
	document.getElementById('genres').selectedIndex = 0;	
	document.getElementById('plaats').value = document.getElementById('c_fill_in_a_place').value;
	document.getElementById('provincies').selectedIndex = 0;	
	document.getElementById(div).innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('concerten.php?search_artist=1&artist='+text,div,'','',1);
}
																	
function select_concert_filter( GenreID, Plaats, ProvincieID, div)
{				   							   	
	if ( Plaats == document.getElementById('c_fill_in_a_place').value )
	{
		Plaats = '';		
	}
	document.getElementById('artiest').value ='';
	document.getElementById(div).innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('concerten.php?filtered=1&GenreID='+GenreID+'&Plaats='+Plaats+'&ProvincieID='+ProvincieID,div,'','',1);
/*
	document.getElementById('plaats').value=buffer;
	if ( Plaats == '' )
	{
		document.getElementById('plaats').value = 'Vul een plaats in..';		
	}
*/	
}
			

function concert_plaats_focus()
{
	if (concert_plats_changed==0)
	{							
		document.getElementById('plaats').value='';
	}
}

function concert_plaats_blur()
{
	if (concert_plats_changed==0)
	{							
		document.getElementById('plaats').value=document.getElementById('c_fill_in_a_place').value;
	}
}				  
							 
function concert_plaats_keydown(e)
{	
 /*
	var keynum
	var keychar
	var numcheck

	if(window.event) // IE	
	{
		keynum = e.keyCode
	}
	else if(e.which) // Netscape/Firefox/Opera
	{
		keynum = e.which
	}	
	
	//alert(keynum);
					
	if (keynum==8) 
	{												 
		buffer = buffer.substring(0,buffer.length-1);
	}
	else if (keynum==46 || keynum==110) 
	{												 
		buffer = '';
	}
	else
	{
		keychar = String.fromCharCode(keynum)
		buffer += keychar;
	} 
	*/
}

function concert_plaats_keyup(GenreID, Plaats, ProvincieID, div)
{							
	clearTimeout(timeout);  
	//clearTimeout(timeout2);  						
	//event kell ide
	//document.getElementById('plaats').value=buffer;
	if (document.getElementById('plaats').value=='')
	{
		concert_plats_changed=0;	
		timeout=setTimeout("select_concert_filter('"+GenreID+"', '"+Plaats+"', '"+ProvincieID+"', '"+div+"')", 3000);
		/*
		buffer=document.getElementById('plaats').value;
		timeout2=setTimeout("document.getElementById('plaats').value='zoeken...';", 1000);				
		*/
	}
	else										   
	{							  
		concert_plats_changed=1;															 
		timeout=setTimeout("select_concert_filter('"+GenreID+"', '"+Plaats+"', '"+ProvincieID+"', '"+div+"')", 3000);
		/*
		buffer=document.getElementById('plaats').value;		
		timeout2=setTimeout("document.getElementById('plaats').value='zoeken...';", 1000);				
		*/
	}
}								   

function concert_clear_filter(div){
	clearTimeout(timeout);	 
	document.getElementById('genres').selectedIndex = 0;	
	document.getElementById('plaats').value = document.getElementById('c_fill_in_a_place').value;	
	document.getElementById('provincies').selectedIndex = 0;		
	select_concert_filter( 0, '', 0, div );	
}
														  
function concertikkom(ID,ConcertID,div){									   
	if (div=='')
		xmlhttpPost2('concerten.php?ikkom=1&ID='+ID+'&ConcertID='+ConcertID);
	else
		xmlhttpPost('concerten.php?ikkom=1&ID='+ID+'&ConcertID='+ConcertID,div,'','',1);	
}	   


function concertikkom_we(ConcertID,Expand,ID,div)
{				 												 
	if(ConcertID>0)
	  {													 
		xmlhttpPost('concerten.php?ikkom=1&ID='+ID+'&ConcertID='+ConcertID+'&Expand='+Expand,div,'','',1);
	  }
}  		


function insertAtCursor(myField, myValue) { 
//IE support 				  
	if (document.selection) { 
		myField.focus(); 		
		//in effect we are creating a text range with zero 
		//length at the cursor location and replacing it 
		//with myValue 
		sel = document.selection.createRange(); 
		sel.text = myValue; 
	} 
	//Mozilla/Firefox/Netscape 7+ support 
	else if (myField.selectionStart || myField.selectionStart == '0') { 
		var startPos = myField.selectionStart; 
		var endPos = myField.selectionEnd; 
		myField.value = myField.value.substring(0, startPos)+ myValue+ myField.value.substring(endPos, myField.value.length); 
	} else { 
		myField.value += myValue; 
	} 						
	myField.focus();
} 
													

//artist front


//START CONCERT
function showallconcerts_front(artist_id,limit)
{
	xmlhttpPost('show_artiesten_info.php?do=print_concerts_front&artist_id='+document.getElementById('artist_id').value+'&limit='+limit,'artistConcerts','','',1);
}
		 
function infoConcert(ConcertID,expand,div)
  {							  
	if (ConcertID>0)
	{
		xmlhttpPost('show_artiesten_info.php?do=print_concert_info&ConcertID='+ConcertID+'&expand='+expand,div,'','',1);
		//xmlhttpPost('concerten.php?ID='+1+'&ConcertID='+ConcertID+'&expand='+expand,div,'','',1);		
	}
	else
	{
		document.getElementById(div).innerHTML='&nbsp;'; 
	}
 } 	
  
//END COCNERT   
  														   
  

//images
  
function picturesview()
{		
	var view=parseInt(document.getElementById('limit_picture').value);
	if (view==0) 
	{	
		document.getElementById('limit_picture').value=1;
		document.getElementById('all_picture_text').innerHTML=document.getElementById('recent_pictures_text').value;				
		xmlhttpPost('show_artiesten_info.php?do=picture_view_all&artist_id='+document.getElementById('artist_id').value,'picture_table','','',1);		
	} 
	else
	{
		document.getElementById('limit_picture').value=0;
		document.getElementById('all_picture_text').innerHTML=document.getElementById('all_pictures_text').value;						
		xmlhttpPost('show_artiesten_info.php?do=picture_view&artist_id='+document.getElementById('artist_id').value,'picture_table','','',1);				
	}
}


function friendsview()
{		
	var view=parseInt(document.getElementById('limit_friend').value);
	if (view==0) 
	{	
		document.getElementById('limit_friend').value=1;
		document.getElementById('all_friend_text').innerHTML=document.getElementById('recent_friends_text').value;				
		xmlhttpPost('show_artiesten_info.php?do=friend_view_all&artist_id='+document.getElementById('artist_id').value,'friend_table','','',1);		
	} 
	else
	{
		document.getElementById('limit_friend').value=0;
		document.getElementById('all_friend_text').innerHTML=document.getElementById('all_friends_text').value;						
		xmlhttpPost('show_artiesten_info.php?do=friend_view&artist_id='+document.getElementById('artist_id').value,'friend_table','','',1);				
	}
}

//images		   


//tabs//					 

function unselectTabs()
  {
	document.getElementById('Overzicht1').className="menuLeft";
	document.getElementById('Overzicht2').className="menuMiddle";
	document.getElementById('Overzicht3').className="menuRight";
	
	document.getElementById('Recensies1').className="menuLeft";
	document.getElementById('Recensies2').className="menuMiddle";
	document.getElementById('Recensies3').className="menuRight";
	
	document.getElementById('Podcasts1').className="menuLeft";
	document.getElementById('Podcasts2').className="menuMiddle";
	document.getElementById('Podcasts3').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";
	
	document.getElementById('Interview1').className="menuLeft";
	document.getElementById('Interview2').className="menuMiddle";
	document.getElementById('Interview3').className="menuRight";
	

  }
  


function OverzichtTab()
  {
	selectTab("Overzicht");
	xmlhttpPost('show_artiesten_info.php?do=OverzichtTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
  
  
function RecensiesTab()
  {
	selectTab("Recensies");	 
	xmlhttpPost('show_artiesten_info.php?do=RecensiesTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
   
  
function TagsTab()
  {
	selectTab("Tags");
	xmlhttpPost('show_artiesten_info.php?do=TagsTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
  }
  
 
  
  
////tabs


//interview

function SendInterview()
{
	if (document.getElementById('interview_text').value>'')
		xmlhttpPost('show_artiesten_info.php?do=sendinterview&artist_id='+document.getElementById('artist_id').value+'&question='+document.getElementById('interview_text').value,'interview_form','','',1);
}


///tags


function deletetag(TagId)
{
	if (confirm('Delete tag?')==1)
	{
		document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
		xmlhttpPost('show_artiesten_info.php?do=deletetag&TagId='+TagId+'&artist_id='+document.getElementById('artist_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_artiesten_info.php?do=addtag&tag='+newval+'&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);						
	}
}

//small menu
 
function hide_all_windows()
{
	showCalendarW(0);
	showCalendarB(0);
}

function showupload_form(visible) 
{	
	hide_all_windows();
	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=480;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=170;				
			setTimeout('showopadd('+9+')',10);
		} else {			
			setTimeout('resizeshow(375,170)',10);
		}
		xmlhttpPost('show_artiesten_info.php?do=print_upload_form&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);				
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}


function closeUploadForm(page)
  {		
	selectTabNew('overview');
  }  
  		 
function showtell_a_friend(visible)
{
	hide_all_windows();
	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=480;
			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+')',10);
		} else {			
			setTimeout('resizeshow(375,340)',10);
		}
		xmlhttpPost('show_artiesten_info.php?do=getTellaFriend&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);								
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

function showinvitation_for_collaboration(visible) 
{	
	hide_all_windows();																			
	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=480;
			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_artiesten_info.php?do=getInvitationForCollaboration&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);								
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	
  

function showplayed_in_my_podcast(visible) 
{	
	hide_all_windows();																			
	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=480;
			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_artiesten_info.php?do=getPlayedInMyPodcast&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);								
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	


function book_artist()
{
	var date=document.getElementById('new_book_date').value;
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	xmlhttpPost('show_artiesten_info.php?do=setBookArtist&artist_id='+document.getElementById('artist_id').value+'&date='+date,'window_data','','',1);	  								
	//xmlhttpPost('show_artiesten_info.php?do=setBookArtist&artist_id='+document.getElementById('artist_id').value+'&date=','book_this_artist_data','','',1);
}

function showbook_this_artist(visible)
{
	hide_all_windows();
	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=480;
			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);
		} else {			
			setTimeout('resizeshow(375,100)',10);
		}
		xmlhttpPost('show_artiesten_info.php?do=showbook','window_data','','',1);	  							
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

//private_msg

function showprivate_msg_form(visible) 
{	
	hide_all_windows();																			
	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=480;
			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_artiesten_info.php?do=getSendPrivateMsg&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	


//  
  
///review  

function showreview_form(visible) 
{	
	hide_all_windows();																				
	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=480;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=260;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,260)',10);
		}
		xmlhttpPost('show_artiesten_info.php?do=getRecensie','window_data','','',1);	  					
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	


 	   
function sendRecensie()
{
	var Date=document.getElementById('new_review_date').value;
	var Location=document.getElementById('new_review_location').value;
	var Place=document.getElementById('new_review_place').value;
	var Text=document.getElementById('new_review_text').value;		

	for (var i = 0; i < Text.length; ++i)
		Text=Text.replace('\n',"<br>");
	
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	xmlhttpPost('show_artiesten_info.php?do=sendRecensie&artist_id='+document.getElementById('artist_id').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
}  
  
function refreshrecensies()
{
	showreview_form(0);
	if (document.getElementById('selected_tab').value>"Recensies" || document.getElementById('selected_tab').value<"Recensies")	
		;
	else
		xmlhttpPost('show_artiesten_info.php?do=RecensiesTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);	
}  
  
//


///calendar
function showcalendar_book(visible,e) 
{							   
	if ( visible==1 )
	{						 												
		document.getElementById('calendar_window_book').style.top=200;
		document.getElementById('calendar_window_book').style.left=200;
		document.getElementById('calendar_window_book').style.visibility='visible';
	}
	else
	{
		document.getElementById('calendar_window_book').style.visibility='hidden';
	}
}

function showCalendarB(e)
{		
	if(sw==0)
    {
		showcalendar(1,e); 	
		xmlhttpPost('calendar_prog2.php?date='+document.getElementById('new_review_date').value+'&field_name=new_review_date','calendar_list','','',1);
	}
}



function showcalendar(visible,e) 
{							   
	if ( visible==1 )
	{						 												
		document.getElementById('calendar_window').style.top=MousePos(e,'y')-20;
		document.getElementById('calendar_window').style.left=MousePos(e,'x')+100;		
		document.getElementById('calendar_window').style.visibility='visible';
	}
	else
	{
		document.getElementById('calendar_window').style.visibility='hidden';
	}
}

function showCalendarW(visible)
{		
	if ( visible==1 ) {
		document.getElementById('datewindow_data').innerHTML='<img src="img/loading.gif">';
		xmlhttpPost('calendar_prog2.php?date='+document.getElementById('new_review_date').value+'&field_name=new_review_date','datewindow_data','','',1);		
		if (document.getElementById('datewindow').className=='windowmain')
		{
			document.getElementById('datewindow').className='windowmain100';				
			document.getElementById('datewindow').style.top=510;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('datewindow').style.left=tableleft+580;
			document.getElementById('datewindow').style.width=220;
			document.getElementById('datewindow').style.height=200;				
			setTimeout('dateshowopadd('+9+')',10);
		} else {			
			setTimeout('dateresizeshow(220,200)',10);
		}
 	} 
	else															   
	{		
		opacity_timer=setTimeout('dateshowopadd2('+1+')',10);
	}	
}

function showCalendarB(visible)
{		
	if ( visible==1 ) {
		document.getElementById('datewindow_data').innerHTML='<img src="img/loading.gif">';
		xmlhttpPost('calendar_prog2.php?date='+document.getElementById('new_book_date').value+'&field_name=new_book_date','datewindow_data','','',1);
		if (document.getElementById('datewindow').className=='windowmain')
		{
			document.getElementById('datewindow').className='windowmain100';				
			document.getElementById('datewindow').style.top=510;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('datewindow').style.left=tableleft+580;
			document.getElementById('datewindow').style.width=220;
			document.getElementById('datewindow').style.height=200;				
			setTimeout('dateshowopadd('+9+')',10);
		} else {			
			setTimeout('dateresizeshow(220,200)',10);
		}
 	} 
	else															   
	{		
		opacity_timer=setTimeout('dateshowopadd2('+1+')',10);
	}	
}

function loadcalendar(month,year,fieldname)
{					 
	xmlhttpPost('calendar_prog2.php?month='+month+'&year='+year+'&field_name='+fieldname,'datewindow_data','','',1);
}	

function selectDate(date,date_c,fieldname)
{				  										
	document.getElementById(fieldname).value=date;
	document.getElementById(fieldname+'_aux').value=date_c;	
	showCalendarW(0);
}	
												  

function refreshReacties(Page)
{
	xmlhttpPost('show_artiesten_info.php?do=refreshReacties&page='+Page+'&artist_id='+document.getElementById('artist_id').value,'reactions_table','','',1);	
}		  

function refreshReactiesTab(Page)
{
		document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_artiesten_info.php?do=RecensiesTab&page='+Page+'&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
}

function SArtistChange2() {
	document.getElementById('concert_text').style.paddingLeft=20;
	document.getElementById('concert_text').innerHTML=document.getElementById('c_concerts').value;
}

function SArtistChange(ArtistId)
{
	xmlhttpPost('show_artiesten_info.php?do=print_concerts_frop&ArtistId='+ArtistId,'concert_drop','','',1);
}

function SArtistChange3(ArtistId)
{
	xmlhttpPost('show_artiesten_info.php?do=print_concerts_frop2&ArtistId='+ArtistId,'concert_drop','','',1);
}


function showsend_recensie_concert(visible) 
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		//page_width=getPageSizeWithScroll('w');
		page_height=getPageSizeWithScroll('h');
		document.getElementById('black_wall').className='black_wall_1';		
		//document.getElementById('black_wall').style.width=page_width;
		document.getElementById('black_wall').style.height=page_height;
		document.getElementById('genres').style.visibility='hidden';
		document.getElementById('provincies').style.visibility='hidden';		
		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=520;
			var tableleft=document.getElementById('total').offsetLeft;
			document.getElementById('window').style.left=tableleft+550;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=320;				
			setTimeout('showopadd('+9+')',10);
		} else {			
			setTimeout('resizeshow(375,320)',10);
		}
		xmlhttpPost('show_artiesten_info.php?do=getSendRecensieConcert','window_data','','',1);										
		//page_width=getPageSizeWithScroll('w');
		page_height=getPageSizeWithScroll('h');
		//document.getElementById('black_wall').style.width=page_width;
		document.getElementById('black_wall').style.height=page_height;
 	} 
	else															   
	{		
		document.getElementById('genres').style.visibility='visible';
		document.getElementById('provincies').style.visibility='visible';		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		document.getElementById('black_wall').className='black_wall_0';		
	}
}	

function send_concert_to_buddy(concert_id)
{
	var parameter = '';
	var nr=document.getElementById('total_friend_'+concert_id).value;
	var message=document.getElementById('buddy_area_'+concert_id).value;
	var div='send_message_'+concert_id;
	if (nr>0)
	{
		if (message=='')
		{
			alert(document.getElementById('c_write_some_text').value);
			document.getElementById('buddy_area_'+concert_id).focus();
			return false;
		}

			
		parameter='?ConcertID='+concert_id+'&message='+message;
		
		var friends = new Array()
		j=1;
		for (var i=1;i<=nr;i++)
		{
			if (document.getElementById('buddy_chk_'+i+'_'+concert_id).checked==true)
			{
				parameter=parameter+'&id'+j+'='+document.getElementById('buddy_chk_'+i+'_'+concert_id).value+'&type'+j+'='+document.getElementById('buddy_type_'+i+'_'+concert_id).value;
				j++;
			}
		}
		if ((j-1)>0)
			parameter=parameter+'&nr='+(j-1);

		if ((j-1)==0)
		{
			alert(document.getElementById('c_select_friend_first').value);
			return false;
		}			
			
		xmlhttpPost('concerten.php'+parameter,div,'','',1);
		//window.location='concerten.php'+parameter;
	}
	else
	{
		alert(document.getElementById('c_select_friend_first').value);
	}
}

function showsend_a_music_tip(visible)
{
	if ( visible==1 ) {
		document.getElementById('send_a_music_tip_form').style.visibility='visible';								
		xmlhttpPost('show_artiesten_info.php?do=getSendMusicTip&artist_id='+document.getElementById('artist_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';	
 	}	
}


/* Daniel 01.06.2007*/
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();
}

function check_search() {
	form=_get('zoeken');
	
	var secureSpace=form.SearchQuery.value.replace(' ', '');
	
	if ((form.SearchQuery.value.length<minSearchWord)||(secureSpace.length<minSearchWord)) {
		alert(searchErrorMsg);
		return false;
	}
	else return true;
}

function send_search() {
	form=_get('zoeken');
	
	var secureSpace=form.SearchQuery.value.replace(' ', '');
	
	if ((form.SearchQuery.value.length<minSearchWord)||(secureSpace.length<minSearchWord)) {
		alert(searchErrorMsg);
	}
	else {
		xmlhttpPost('search.php?Ajax=1&SearchQuery='+form.SearchQuery.value,'searchAll','','',1);
	}
}
/* End Daniel 01.06.2007*/
/* Daniel 05.06.2007*/
function homeShowConcert(ConcertId, Type) {
	xmlhttpPost('index_ajax.php?concert_id='+ConcertId+'&type='+Type,'concert_le_'+ConcertId,'','',1);
	
	var is_moz = (navigator.product == 'Gecko');
	
	hide=_get('sponsors');
	if (is_moz)
		if (Type==1)
			hide.style.visibility="hidden";
			else hide.style.visibility="visible";
}
/* End Daniel 05.06.2007*/



function textCounter(field, countfield, maxlimit) {
	var n = field.value.length
	if (n > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
	else 
	{
		var max=field.offsetWidth;		
		document.getElementById(countfield).style.width=parseInt(max*n/maxlimit);		
	}
		//countfield.value = maxlimit - field.value.length;
}

function show_comments(LogId)
{
	xmlhttpPost('show_artiesten_info.php?do=getComments&LogId='+LogId+'&artist_id='+document.getElementById('artist_id').value,'weblog_id','','',1);						
}

function show_weblogs()
{
	xmlhttpPost('show_artiesten_info.php?do=showWeblogs&artist_id='+document.getElementById('artist_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('reviews_1').className="tabLeft";
	document.getElementById('reviews_2').className="tabMiddle";
	document.getElementById('reviews_3').className="tabRight";
	
	document.getElementById('podcasts_1').className="tabLeft";
	document.getElementById('podcasts_2').className="tabMiddle";
	document.getElementById('podcasts_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('interview_1').className="tabLeft";
	document.getElementById('interview_2').className="tabMiddle";
	document.getElementById('interview_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_artiesten_info.php?do=OverzichtTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
		break;
		case 'reviews':
			xmlhttpPost('show_artiesten_info.php?do=RecensiesTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
		break;
		case 'podcasts':
			xmlhttpPost('show_artiesten_info.php?do=PodcastsTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);			
		break;
		case 'tags':
			xmlhttpPost('show_artiesten_info.php?do=TagsTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
		break;
		case 'biography':
			xmlhttpPost('show_artiesten_info.php?do=BiografieTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
		break;
		case 'interview':
			xmlhttpPost('show_artiesten_info.php?do=InterviewTab&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);
		break;
	}
  }
  
function show_concerts(limit)
{
	xmlhttpPost('show_artiesten_info.php?do=show_concerts&limit='+limit+'&artist_id='+document.getElementById('artist_id').value,'artistConcerts','','',1);	
}

function friendsviewall()
{
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_artiesten_info.php?do=friend_view_all&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);		
}

function friendsview()
{		
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_artiesten_info.php?do=limit_feed&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);		
}

function picturesviewall()
{		
	document.getElementById('ContentTabs').innerHTML=document.getElementById('loading').innerHTML;
	xmlhttpPost('show_artiesten_info.php?do=show_all_pictures&artist_id='+document.getElementById('artist_id').value,'ContentTabs','','',1);		
}

function showopadd(opacity_c)
{
	if (opacity_c!=0)
	{
		document.getElementById('window').className='windowmain'+opacity_c+'0';	
		opacity_c--;
		opacity_timer=setTimeout('showopadd('+opacity_c+')',10);
	} else 
	{
		document.getElementById('window').className='windowmain00';	
	}
}

function dateshowopadd(opacity_c)
{
	if (opacity_c>0)
	{
		document.getElementById('datewindow').className='windowmain'+opacity_c+'0';	
		opacity_c=opacity_c-2;
		opacity_timer=setTimeout('dateshowopadd('+opacity_c+')',10);
	} else 
	{
		document.getElementById('datewindow').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 dateshowopadd2(opacity_c)
{
	if (opacity_c<10)
	{
		document.getElementById('datewindow').className='windowmain'+opacity_c+'0';	
		opacity_c=opacity_c+2;
		opacity_timer=setTimeout('dateshowopadd2('+opacity_c+')',10);
	} else 
	{
		document.getElementById('datewindow').className='windowmain';		
		document.getElementById('datewindow').style.top=-1000;
		document.getElementById('datewindow').style.left=-1000;		
	}
}

function resizeshow(w,h)
{
	document.getElementById('window').style.width=w;
	document.getElementById('window').style.height=h;
}

function dateresizeshow(w,h)
{
	document.getElementById('datewindow').style.width=w;
	document.getElementById('datewindow').style.height=h;
}


function AddAsFriend(visible)
{	
	if ( visible==1 ) {
		//hide_all_divs();	
		show_black();		
		xmlhttpPost('small_options.php?action=ACTION_ADD_BUDDY&friendId='+document.getElementById('artist_id').value+'&friendType=1','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 AddAsFriendForm(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=160;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,160)',10);
			//alert(document.getElementById('added_friend').value);
		}	
		xmlhttpPost('show_artiesten_info.php?do=getfriendform&artist_id='+document.getElementById('artist_id').value,'window_data','','',1);
 	} 
	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('artist_id').value+'&UserToType=1','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_artiesten_info.php?do=addfavorite&artist_id='+document.getElementById('artist_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();
	}
}


function music_notification() {
	if (document.getElementById('music_notification').value==1)
	{
		document.getElementById('music_notification').value=0;
		document.getElementById('img_music_notification').src="img/icons/checkbox.jpg";
	}
	else
	{
		document.getElementById('music_notification').value=1;
		document.getElementById('img_music_notification').src="img/icons/checkbox_checked.jpg";
	}
}


function concert_notification() {
	if (document.getElementById('concert_notification').value==1)
	{
		document.getElementById('concert_notification').value=0;
		document.getElementById('img_concert_notification').src="img/icons/checkbox.jpg";
	}
	else
	{
		document.getElementById('concert_notification').value=1;
		document.getElementById('img_concert_notification').src="img/icons/checkbox_checked.jpg";
	}
}

function setFriendN()
{
	setTimeout('resizeshow(375,100)',10);				
	setTimeout("document.getElementById('add_friend').innerHTML=document.getElementById('friend_added_text').innerHTML;",500);
	var music=document.getElementById('music_notification').value;
	var concert=document.getElementById('concert_notification').value;
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	xmlhttpPost('show_artiesten_info.php?do=setfriendform&artist_id='+document.getElementById('artist_id').value+'&music_notification='+music+'&concert_notification='+concert+'&text='+document.getElementById('friends_added_text').innerHTML,'window_data','','',1);
}

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 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 edit_goldmember() 
{
	xmlhttpPost('show_artiesten_info.php?do=showgoldmemberform&artist_id='+document.getElementById('artist_id').value,'userHeader','','',1);						
}

function cancel_gold()
{
	xmlhttpPost('show_artiesten_info.php?do=cancelgoldmemberform&artist_id='+document.getElementById('artist_id').value,'userHeader','','',1);						
}

function save_gold()
{
	var is_gold=document.getElementById('is_gold').value;	
	var day=document.getElementById('b_day').value;
	var month=document.getElementById('b_month').value;
	var year=document.getElementById('b_year').value;
	var nr=document.getElementById('nr').value;
	var type=document.getElementById('type').value;
	//alert('show_listener_info.php?do=showgoldmemberform&listener_id='+document.getElementById('listener_id').value+'&save='+1+'&is_gold='+is_gold+'&day='+day+'&month='+month+'&year='+year+'&nr='+nr+'&type='+type);	
	xmlhttpPost('show_artiesten_info.php?do=showgoldmemberform&artist_id='+document.getElementById('artist_id').value+'&save='+1+'&is_gold='+is_gold+'&day='+day+'&month='+month+'&year='+year+'&nr='+nr+'&type='+type,'userHeader','','',1);						
}

function AddBlock(visible,val)
{	
	if ( visible==1 ) {
		//hide_all_divs();			
		show_black();
		xmlhttpPost('show_artiesten_info.php?do=addblock&artist_id='+document.getElementById('artist_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();
	}
}

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();
}

function change_featured(id) {
	element=_get("changeFeatured");
	
	if (element.checked==true) {
		xmlhttpPost('show_artiesten_info.php?do=change_featured&artist_id='+id,'','','',0);
		element.disabled=true;
		}
}