/*ajax*/

//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);
			    switch (div) {
			    	case 'add_favorit':
			    		document.getElementById('add_favorit').className='';
			    		break;
			    	case 'send_heart':
			    		document.getElementById('send_heart').className='';
			    		break;
			    	case 'add_block':
			    		document.getElementById('add_block').className='';
			    		break;			    	
			    	case 'add_friend':
			    		document.getElementById('add_friend').className='';
			    		break;	
			    }
			    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;
  }

/*ajax*/

/* mouse */

function MousePos(evt,coord)
{		
  var e = (window.event) ? window.event : evt;
  var xMousePosMax = (window.pageXOffset) ? window.pageXOffset : document.body.scrollLeft;  
  var yMousePosMax = (window.pageYOffset) ? window.pageYOffset : document.body.scrollTop;
  x=xMousePosMax+e.clientX;
  y=yMousePosMax+e.clientY;

  if (coord=='x')
	  return x;
  if (coord=='y')
	  return y;
}

/* mouse */


/*menu*/

function getY( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
	iReturnValue += oElement.offsetTop;
	oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

function getX( oElement )
{
	var iReturnValue = 0;
	while( oElement != null ) {
	iReturnValue += oElement.offsetLeft;
	oElement = oElement.offsetParent;
	}
	return iReturnValue;
}

var menu_left_time;
function show_sub_menu_left(index,visible)
{			
	var length=document.getElementById('menu_left_nr_of_subs').value;
	for(i=0;i<length;i++) {
		document.getElementById('sub_menu_left'+i).style.visibility='hidden';
		//document.getElementById('menu_left_'+i).className='menu_item';
	}

	var left=getX(document.getElementById('menu_left_'+index));
	var top=getY(document.getElementById('menu_left_'+index));
	
	document.getElementById('sub_menu_left'+index).style.left=left+8+'px';
	document.getElementById('sub_menu_left'+index).style.top=parseInt(top+document.getElementById('menu_left_'+index).offsetHeight+10)+'px';
	
	if (visible==1) {
		if (document.getElementById('menu_left_nr_of_sub'+index).value>0)
			document.getElementById('sub_menu_left'+index).style.visibility='visible';
		//document.getElementById('menu_left_'+index).className='menu_item_selected';
	} else {
		document.getElementById('sub_menu_left'+index).style.visibility='hidden';
		//document.getElementById('menu_left_'+index).className='menu_item';
	}
}

var menu_login_time;
function show_sub_menu_login(visible)
{			
	document.getElementById('login_submenu').style.visibility='hidden';
	
	var left=getX(document.getElementById('menu_login'));
	var top=getY(document.getElementById('menu_login'));
	
	document.getElementById('login_submenu').style.left=parseInt(left-document.getElementById('login_submenu').offsetWidth+document.getElementById('menu_login').offsetWidth+10)+'px';
	document.getElementById('login_submenu').style.top=parseInt(top+document.getElementById('menu_login').offsetHeight+10)+'px';
	
	if (visible==1) {
		document.getElementById('login_submenu').style.visibility='visible';
	} else {
		document.getElementById('login_submenu').style.visibility='hidden';
	}
}


function select_m(obj)
{
	obj.style.background='#D60A56';
	obj.style.color='#FFFFFF';
}


function unselect_m(obj)
{
	obj.style.background='#FFE5F1';
	obj.style.color='#000000';
}

/*menu*/


/*search*/

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);
	}
}

/*search*/


/*login*/

function remember()
{																		
	if (document.getElementById('remember').value==1)
	{
		document.getElementById('img_remember').src='img/icons/checkbox.jpg';	
		document.getElementById('remember').value=0;
	}
	else																			
	{
		document.getElementById('img_remember').src='img/icons/checkbox_checked.jpg';	
		document.getElementById('remember').value=1;		
	}
}

/*login*/

/* home */

function homeShowConcert(ConcertId, Type) {
	//document.getElementById('concert_loader').src='index_iframe.php?command=home_concet_info&concert_id='+ConcertId+'&type='+Type;
	parent.concert_loader.location.replace('index_iframe.php?command=home_concet_info&concert_id='+ConcertId+'&type='+Type);
}

/* home */

/*loading*/
function page_loaded(div1)
{
	document.getElementById(div1).innerHTML=document.getElementById('buffer_'+div1).innerHTML;
	document.getElementById('buffer_'+div1).innerHTML='';
}

/*artists list*/

var timeout=null;

function input_artiesten_filter(delay) {
	form=_get('filterForm');
	
	clearTimeout(timeout);
	
	if (((form.name.value.length>=2)||(form.name.value==''))&&((form.location.value.length>=2)||(form.location.value=='')))
		timeout=setTimeout("select_artists_filtered()", delay);
}

function select_artists_filtered() {
	document.getElementById('artiesten').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm.submit();
}

function reset_artists_filtered() {
	form=_get('filterForm');
	
	form.music.options[0].selected=true;
	form.region.options[0].selected=true;
	form.name.value=type_naam_ext;
	form.location.value=type_woonplaats_ext;
	form.order.options[9].selected=true;
	form.page.value=0;
	
	select_artists_filtered();
}

/*listener list*/
function select_listeners_filtered() {
	document.getElementById('listeners_').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm_.submit();
}

function search_listeners_filtered() {
	document.getElementById('listeners_').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm.submit();
}


/*podcasters list*/
function select_podcsters_filtered() {
	document.getElementById('podcasters_').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm_.submit();
}

function search_podcsters_filtered() {
	document.getElementById('podcasters_').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm.submit();
}


/*concerts*/

var timeout=null;

function input_concerts_filter(delay) {
	form=_get('filterForm');
	
	clearTimeout(timeout);
	
	if ((form.location.value.length>3)||(form.location.value==''))
		timeout=setTimeout("select_concerts_filtered3()", delay);
}

function select_concerts_filtered() {
	document.getElementById('concerts').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm.submit();
}

function search_concerts_filtered2() {
		document.filterForm.location.value=type_location_ext;
		document.filterForm.music.options[0].selected=true;
		document.filterForm.region.options[0].selected=true;
		document.filterForm.artiest.value=document.filterForm2.artiest.value;
		
		document.getElementById('concerts').innerHTML=document.getElementById('buffer_loader').innerHTML;	
		document.filterForm.submit();
}

function select_concerts_filtered3() {
	document.filterForm.artiest.value=''; 
	document.filterForm2.artiest.value='';
	document.getElementById('concerts').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.filterForm.submit();
}


function reset_concerts_filtered() {
	
	document.filterForm.page.value=0;
	document.filterForm.artiest.value='';
	document.filterForm2.artiest.value='';
	document.filterForm.location.value=type_location_ext;
	document.filterForm.music.options[0].selected=true;
	document.filterForm.region.options[0].selected=true;

	select_concerts_filtered();
}

function getconcertinfo(id,action) {
	parent.concert_loader.location.replace('index_iframe.php?command=getconcertinfo&id='+id+'&action='+action);
}

function concertikkom_we(id,action)
{	
	parent.concert_loader.location.replace('index_iframe.php?command=concertusercome&id='+id+'&action='+action);
}  	

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();
} 

function showsend_recensie_concert(visible) 
{	
	if ( visible==1 ) {
		page_height=getPageSizeWithScroll('h');
		document.getElementById('black_wall').className='black_wall_1';		
		document.getElementById('black_wall').style.height=page_height;
		document.getElementById('music').style.visibility='hidden';
		document.getElementById('region').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=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+550;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=355;				
			setTimeout('showopadd('+9+')',10);
		} else {			
			setTimeout('resizeshow(375,355)',10);
		}		
		document.getElementById("review_loader").src='index_iframe.php?command=getconcertreviewform_list';
		page_height=getPageSizeWithScroll('h');
		document.getElementById('black_wall').style.height=page_height;
 	} 
	else															   
	{	
		document.getElementById('music').style.visibility='visible';
		document.getElementById('region').style.visibility='visible';		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		document.getElementById('black_wall').className='black_wall_0';		
	}
}	

function concert_list_from_artist_wnd_rev_concert(id) {
	document.form1.artist.value=id;
	document.form1.concert.value="";
	document.getElementById("loader").src='index_iframe.php?command=getconcertreviewform_list_concertlist&id='+id;
}

function send_recensie_concert() {
	if (document.form1.artist.value<1)	
		return;
	if (document.form1.concert.value<1)
		return;
	document.form1.command.value="send";
	document.form1.submit();
}


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(c_write_some_text);
			document.getElementById('buddy_area_'+concert_id).focus();
			return false;
		}

		var friends = new Array()
		j=1;
		for (var i=1;i<=nr;i++)
		{
			if (document.getElementById('buddy_chk_'+i+'_'+concert_id).checked==true)
				j++;
		}

		if ((j-1)==0)
		{
			alert(c_select_friend_first);
			return false;
		}			
		
		document.getElementById('to_friend_'+concert_id).command.value="send_concert_to_friends";
		document.getElementById('to_friend_'+concert_id).submit();
		document.getElementById('send_message_'+concert_id).innerHTML=document.getElementById('send_loader').innerHTML;
		//xmlhttpPost('concerten.php'+parameter,div,'','',1);
		//window.location='concerten.php'+parameter;
	}
	else
	{
		alert(c_select_friend_first);
	}
}

/*general*/

function highlight(ob)
{
	ob.style.background='#FFFFE0';
}

function unhighlight(ob)
{
	ob.style.background='#FFFFFF';;
}

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 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 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 resizeshow(w,h)
{
	document.getElementById('window').style.width=w;
	document.getElementById('window').style.height=h;
}

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 show_black_profile() {
	
	page_height=getPageSizeWithScroll('h');
	
	if (document.all) {
		var elements=document.getElementsByTagName('select');
	
		for (var i=0; i<elements.length; i++) {		
				elements[i].style.visibility='hidden';
		}	

		var elements=parent.skill_skill.document.getElementsByTagName('select');
	
		for (var i=0; i<elements.length; i++) {		
				elements[i].style.visibility='hidden';
		}		

	}

	if (document.getElementById('musicplayer'))
		document.getElementById('musicplayer').style.visibility='hidden';
	if (document.getElementById('skill_skill'))
		document.getElementById('skill_skill').style.visibility='hidden';
	
	document.getElementById('black_wall').className='black_wall_1';		
	document.getElementById('black_wall').style.height=page_height;		
}

function hide_black_profile() {
	
	if (document.all) {
		var elements=document.getElementsByTagName('select');
	
		for (var i=0; i<elements.length; i++) {		
				elements[i].style.visibility='visible';
		}				
		
		parent.skill_skill.document.getElementById('skill_voted').style.visibility='visible';
	}
	
	if (document.getElementById('musicplayer'))
		document.getElementById('musicplayer').style.visibility='visible';
	if (document.getElementById('skill_skill'))
		document.getElementById('skill_skill').style.visibility='visible';	
	
	
	document.getElementById('black_wall').className='black_wall_0';			
}

function show_black() {
	
	if (document.all) {
		var elements=document.getElementsByTagName('select');
	
		for (var i=0; i<elements.length; i++) {		
				elements[i].style.visibility='hidden';
		}	

	}
	
	if (document.getElementById('musicplayer'))
		document.getElementById('musicplayer').style.visibility='hidden';
	if (document.getElementById('artistPlayer'))
		document.getElementById('artistPlayer').style.visibility='hidden';		
	if (document.getElementById('skill_skill'))
		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 hide_black() {
	
	if (document.all) {
		var elements=document.getElementsByTagName('select');
	
		for (var i=0; i<elements.length; i++) {		
				elements[i].style.visibility='visible';
		}				
		
	}
	
	if (document.getElementById('musicplayer'))
		document.getElementById('musicplayer').style.visibility='visible';	
	if (document.getElementById('artistPlayer'))
		document.getElementById('artistPlayer').style.visibility='visible';		
	if (document.getElementById('skill_skill'))
		document.getElementById('skill_skill').style.visibility='visible';
	
	document.getElementById('black_wall').className='black_wall_0';			
}


function open_picture(url) {
	window.open('popup.php?url='+url,'zoom','scrollbars=auto,width=2,height=2,left=200,top=200,resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0');
}


//Tabs NEW

function unselectPodTabsNew() {
	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('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('pictures_1').className="tabLeft";
	document.getElementById('pictures_2').className="tabMiddle";
	document.getElementById('pictures_3').className="tabRight";
	
	document.getElementById('favartist_1').className="tabLeft";
	document.getElementById('favartist_2').className="tabMiddle";
	document.getElementById('favartist_3').className="tabRight";
}
  
function selectPodTabNew(tab) {				   
	unselectPodTabsNew();
	document.getElementById(tab+'_1').className="tabLeftSelected";
	document.getElementById(tab+'_2').className="tabMiddleSelected";
	document.getElementById(tab+'_3').className="tabRightSelected";
	
	switch (tab) {
		case 'overview':			
			friendsview();
		break;
		case 'used_music':
			pod_music();		
		break;
		case 'tags':
			show_tags();
		break;		
		case 'biography':
			show_biografie();			
		break;		
		case 'pictures':
			show_pictues();
		break;
		case 'favartist':
			show_fav_artists();
		break;		
	}
}

function selectPodTabBackNew(tab) {				   
	unselectPodTabsNew();
	document.getElementById(tab+'_1').className="tabLeftSelected";
	document.getElementById(tab+'_2').className="tabMiddleSelected";
	document.getElementById(tab+'_3').className="tabRightSelected";
	
	switch (tab) {
		case 'overview':			
			friendsview_back();
		break;
		case 'used_music':
			pod_music_back();		
		break;
		case 'tags':
			show_tags();
		break;		
		case 'biography':
			show_biografie_back();			
		break;		
		case 'pictures':
			show_pictues_back();
		break;
		case 'favartist':
			show_fav_artists_back();
		break;		
	}
}

function unselectLisTabsNew() {
	document.getElementById('overview_1').className="tabLeft";
	document.getElementById('overview_2').className="tabMiddle";
	document.getElementById('overview_3').className="tabRight";
	
	document.getElementById('pictures_1').className="tabLeft";
	document.getElementById('pictures_2').className="tabMiddle";
	document.getElementById('pictures_3').className="tabRight";	
	
	document.getElementById('favartist_1').className="tabLeft";
	document.getElementById('favartist_2').className="tabMiddle";
	document.getElementById('favartist_3').className="tabRight";
	
	document.getElementById('favpodcaster_1').className="tabLeft";
	document.getElementById('favpodcaster_2').className="tabMiddle";
	document.getElementById('favpodcaster_3').className="tabRight";	

	document.getElementById('reviews_1').className="tabLeft";
	document.getElementById('reviews_2').className="tabMiddle";
	document.getElementById('reviews_3').className="tabRight";
	
	document.getElementById('tags_1').className="tabLeft";
	document.getElementById('tags_2').className="tabMiddle";
	document.getElementById('tags_3').className="tabRight";
}
  
function selectLisTabNew(tab) {				   
	unselectLisTabsNew();
	document.getElementById(tab+'_1').className="tabLeftSelected";
	document.getElementById(tab+'_2').className="tabMiddleSelected";
	document.getElementById(tab+'_3').className="tabRightSelected";
	
	switch (tab) {
		case 'overview':			
			friendsview();
		break;
		case 'pictures':
			show_pictues();		
		break;
		case 'favpodcaster':
			show_fav_podcasters();
		break;		
		case 'tags':
			show_tags();			
		break;		
		case 'reviews':
			show_reviews(0);
		break;
		case 'favartist':
			show_fav_artists();
		break;		
	}
}

function selectLisTabBackNew(tab) {				   
	unselectLisTabsNew();
	document.getElementById(tab+'_1').className="tabLeftSelected";
	document.getElementById(tab+'_2').className="tabMiddleSelected";
	document.getElementById(tab+'_3').className="tabRightSelected";
	
	switch (tab) {
		case 'overview':			
			friendsview_back();
		break;
		case 'pictures':
			show_pictues_back();		
		break;
		case 'favpodcaster':
			show_fav_podcasters_back();
		break;		
		case 'tags':
			show_tags();			
		break;		
		case 'reviews':
			show_reviews(0);
		break;
		case 'favartist':
			show_fav_artists_back();
		break;		
	}
}


function unselectArtTabsNew() {
	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 selectArtTabNew(tab) {				   
	unselectArtTabsNew();
	
	if (tab=='pictures') {
		document.getElementById('overview_1').className="tabLeftSelected";
		document.getElementById('overview_2').className="tabMiddleSelected";
		document.getElementById('overview_3').className="tabRightSelected";	
	} else {
		document.getElementById(tab+'_1').className="tabLeftSelected";
		document.getElementById(tab+'_2').className="tabMiddleSelected";
		document.getElementById(tab+'_3').className="tabRightSelected";
	}
	
	switch (tab) {
		case 'overview':			
			friendsview();
		break;
		case 'reviews':
			show_reviews();		
		break;
		case 'podcasts':
			show_fav_podcasters();
		break;		
		case 'tags':
			show_tags();			
		break;		
		case 'biography':
			show_biografie();
		break;
		case 'interview':
			show_interview();
		break;		
		
		//only for picture list
		case 'pictures':
			show_pictues();		
		break;		
	}
}

function selectArtTabBackNew(tab) {				   
	unselectArtTabsNew();
	
	if (tab=='pictures') {
		document.getElementById('overview_1').className="tabLeftSelected";
		document.getElementById('overview_2').className="tabMiddleSelected";
		document.getElementById('overview_3').className="tabRightSelected";	
	} else {
		document.getElementById(tab+'_1').className="tabLeftSelected";
		document.getElementById(tab+'_2').className="tabMiddleSelected";
		document.getElementById(tab+'_3').className="tabRightSelected";
	}
	
	switch (tab) {
		case 'overview':			
			friendsview_back();
		break;
		case 'reviews':
			show_reviews();		
		break;
		case 'podcasts':
			show_fav_podcasters_back();
		break;		
		case 'tags':
			show_tags();			
		break;		
		case 'biography':
			show_biografie_back();
		break;
		case 'interview':
			show_interview_back();
		break;		
		
		//only for picture list
		case 'pictures':
			show_pictues_back();		
		break;		
	}
}

/*PROFILES*/

//vote
function ShowVoted(visible)
{	
	if ( visible==1 ) {
		page_height=getPageSizeWithScroll('h');
		show_black_profile();		
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=370;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=100;				
			setTimeout('showopadd('+9+')',10);
			document.getElementById('window_data').innerHTML=document.getElementById('voted').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			document.getElementById('window_data').innerHTML=document.getElementById('voted').innerHTML;			
		}	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black_profile();
	}
}

function CheckReportForm(f)
{	
	if (f.naam.value!=''&&f.email.value!=''&&f.reason.value!='')
		return true;
	else
	{
		alert("Je dient alle velden in te vullen!");
		return false;
	}
}

function ReportUser()
{
	
		page_height=getPageSizeWithScroll('h');
		show_black_profile();		
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';				
			document.getElementById('window').style.top=300;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+300;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=250;				
			setTimeout('showopadd('+9+')',10);
			document.getElementById('window_data').innerHTML=document.getElementById('report_frame').innerHTML;			
		} else {			
			setTimeout('resizeshow(375,100)',10);
			document.getElementById('window_data').innerHTML=document.getElementById('voted').innerHTML;			
		}	
 	
}

function CloseReportTool()
{
	opacity_timer=setTimeout('showopadd2('+1+')',10);
	hide_black_profile();
}


//reacties
function refreshReacties(page,show_delete)
{
	var id=document.getElementById('user_id').value;
	var type=document.getElementById('user_type').value;	
	xmlhttpPost('profile_iframe.php?command=refreshReacties&page='+page+'&id='+id+'&type='+type+'&show_delete='+show_delete,'reactions_table','','',1);	
}		  

function deleteReview(ReactiesID)
{		 
	if (confirm(q_delete_review)==1)
		xmlhttpPost('profile_backend_iframe.php?command=deleteReacties&ReactiesID='+ReactiesID+'&page='+document.getElementById('review_page_nr').value,'reactions_table','','',1);	
}

function AddReviewProfile() {
	document.AddReviewForm.command.value='addReview';
	document.AddReviewForm.send_rev_btn.style.visibility='hidden';	
	document.AddReviewForm.submit();	
	window.parent.tinyMCE.execCommand('mceSetContent',false,'');
}


//general
function friendsview()
{		
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=friend_view&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);		
}

function friendsview_back()
{		
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=friend_view&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);		
}

function friendsviewall()
{
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=friend_view_all&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);		
}

function friendsviewall_back()
{
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=friend_view_all&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);		
}

function show_tags() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;	
	xmlhttpPost('profile_iframe.php?command=show_tags&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
}		

function addtag()
{
	if (document.getElementById('new_tag').value!='')
	{
		document.getElementById('add_tag_form').command.value='add_tag';
		document.getElementById('add_tag_form').submit();		
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	}
}

function deletetag(tag_id) {
	if (confirm(tag_delete_confirm)) {
		document.getElementById('add_tag_form').command.value='delete_tag';
		document.getElementById('tag_id').value=tag_id;
		document.getElementById('add_tag_form').submit();		
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;		
	}
}

function show_biografie() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=BiografieTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_biografie_back() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=BiografieTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_biografie_back_no_loader() {
	xmlhttpPost('profile_backend_iframe.php?command=BiografieTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_interview() {
	alert(disabled_option___);
	return;
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=InterviewTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_pictues() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=showPicture&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
}

function show_pictues_back() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=showPicture&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
}

function show_fav_artists() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=FavArtistsTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_fav_artists_back() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=FavArtistsTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function deleteFavArtist(id) {
	if (confirm(q_delete_delfav)) {
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deleteFavArtist&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
	}
}

function deleteFavPodcaster(id) {
	if (confirm(q_delete_delfav)) {
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deleteFavPodcaster&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
	}
}


function show_fav_podcasters() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=FavPodcastersTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_fav_podcasters_back() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=FavPodcastersTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function show_comments(LogId,edit) {
	document.getElementById('weblog_id').innerHTML=document.getElementById('weblog_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=getComments&LogId='+LogId+'&edit='+edit,'weblog_id','','',1);
}

function show_weblogs(LogId,edit) {
	document.getElementById('weblog_id').innerHTML=document.getElementById('weblog_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=showWeblogs&LogId='+LogId+'&edit='+edit,'weblog_id','','',1);						
}

function show_reviews(page) {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=RecensiesTab&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&page='+page,'ContentTabs','','',1);
}


function deleteLogComment(id) {
	if (confirm(q_delete_reaction))
		xmlhttpPost('profile_iframe.php?command=deleteWeblogComment'+'&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'weblog_id','','',1);	
}

//podcaster
function podcaster_episode(have_music) {
	var player_url=default_host+'podcaster_player.php?podcaster_id='+document.getElementById('podcaster_id').value+'&have_music='+have_music;
	window.parent.podcaster_player.location=player_url;
	document.getElementById('feeds').innerHTML=document.getElementById('feedsdiv').innerHTML;
	if (have_music>0) {
		document.getElementById('ContentTabs_bottom').className="";		
		document.getElementById('ContentTabs_bottom_text').className="";		
	} else {
		;
	}
}

function xmlfeedview()
{	
	document.getElementById('feeds').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.getElementById('ContentTabs_bottom_text').innerHTML="<a href=\"javascript:xmlfeedviewall()\" class=\"xml_all\"><img src=\"img/slider/arrow.gif\" alt=\""+p_all_episode+"\" border=\"0\">"+p_all_episode+"</a>";
	xmlhttpPost('profile_iframe.php?command=prinf_feed&podcaster_id='+document.getElementById('podcaster_id').value+'&limit=4','feeds','','',1);						
}

function xmlfeedviewall()
{
	document.getElementById('feeds').innerHTML=document.getElementById('buffer_loader').innerHTML;
	document.getElementById('ContentTabs_bottom_text').innerHTML="<a href=\"javascript:xmlfeedview()\" class=\"xml_all\"><img src=\"img/slider/arrow.gif\" alt=\""+p_recent_episode+"\" border=\"0\">"+p_recent_episode+"</a>";
	xmlhttpPost('profile_iframe.php?command=prinf_feed&podcaster_id='+document.getElementById('podcaster_id').value,'feeds','','',1);			
}

function pod_music()
{	
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=music_tab&user_id='+document.getElementById('podcaster_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

function pod_music_back()
{	
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=music_tab&user_id='+document.getElementById('podcaster_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
}

//listener
function infoConcert(ConcertID,expand)
{				
	if (ConcertID>0) 
		xmlhttpPost('profile_iframe.php?command=print_concert_info_profile&ConcertID='+ConcertID+'&expand='+expand,'concert_line_'+ConcertID,'','',1);
}

//registrate

function AskGrabber(visible)
{	
	if ( visible==1 ) {
		show_black();
		if (document.getElementById('window').className=='windowmain')
		{
			document.getElementById('window').className='windowmain100';							
			document.getElementById('window').style.top=120;			
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=475;
			document.getElementById('window').style.height=250;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(375,100)',10);
		}
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function SetNewP() {
	document.form1.command.value="try";
	document.form1.submit();
	document.getElementById('window').innerHTML=document.getElementById('buffer_loader').innerHTML;
}


//images
function show_picture_page(page) {	  
	if (page>0)
		xmlhttpPost('profile_iframe.php?command=show_picture_page&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'mypictures','','',1);
}

function show_upicture_page(page) {	  
	if (page>0)
		xmlhttpPost('profile_iframe.php?command=show_upicture_page&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'myupictures','','',1);
}


function show_upicture_page_back(page) {
	if (page>0)
		xmlhttpPost('profile_backend_iframe.php?command=show_upicture_page&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'myupictures','','',1);
}

//images

//interview

function SendInterview()
{
	alert(disabled_option___);
	if (document.getElementById('interview_text').value>'')
		xmlhttpPost('profile_iframe.php?command=SendInterview&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&question='+escape(document.getElementById('interview_text').value),'interview_form','','',1);
}

//interview


//static pages

function editPage(PageID) {
	xmlhttpPost('pages_ajax.php?action=ShowForm&PageID='+PageID+'','pageContent','','',1);
	setTimeout ("tinyMCE.addMCEControl(document.getElementById('WYSIWYG'), 'WYSIWYG')", 500 );
}

function savePage(PageID) {
	form=_get('editForm');

	tinyMCE.triggerSave(true,true);
	tinyMCE.execCommand('mceRemoveControl', false, 'WYSIWYG');
	
	var parameters = "PageTitle=" + escape( form.title.value ) +
                    "&PageContent=" + escape( form.content.value );
					
	var titleElement=_get('pageTitle');
	titleElement.innerHTML=form.title.value;

	xmlhttpPostPages('pages_ajax.php?action=SavePage&PageID='+PageID+'','pageContent','','',1, parameters);
}

function cancelEditing(PageID) {
	xmlhttpPost('pages_ajax.php?action=CancelEditing&PageID='+PageID+'','pageContent','','',1);
}

function xmlhttpPostPages(strURL,div,div2,message,sw,parameters)
  {
    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.setRequestHeader("Content-length", parameters.length);
    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(parameters);
  }

//static pages

//goldmember

function goldmember_showbutton2(visible)
{	
	if ( visible==1 ) {			
		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=80;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=500;
			document.getElementById('window').style.height=460;				
			setTimeout('showopadd('+9+')',40);
			document.getElementById('window_data').innerHTML=document.getElementById('2button').innerHTML;			
		} else {			
			setTimeout('resizeshow(500,460)',10);
			//alert(document.getElementById('added_friend').value);
			document.getElementById('window_data').innerHTML=document.getElementById('2button').innerHTML;			
		}	
 	} 
	else															   
	{
		document.getElementById('window_data').innerHTML="";
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function goldmember_showbutton3(visible)
{	

	if ( visible==1 ) {		
		show_black();
		document.getElementById('b3prise').innerHTML="";
		if (document.getElementById('type1').checked==true) 
			document.getElementById('b3prise').innerHTML='5,00';
		
		if (document.getElementById('type2').checked==true) 
			document.getElementById('b3prise').innerHTML='15,00';
		
		if (document.getElementById('type3').checked==true)
			document.getElementById('b3prise').innerHTML='23,75';		
		
		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=80;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+250;
			document.getElementById('window').style.width=500;
			document.getElementById('window').style.height=350;				
			setTimeout('showopadd('+9+')',40);
			document.getElementById('window_data').innerHTML=document.getElementById('3button').innerHTML;			
		} else {			
			setTimeout('resizeshow(500,350)',10);
			//alert(document.getElementById('added_friend').value);
			document.getElementById('window_data').innerHTML=document.getElementById('3button').innerHTML;			
		}	
 	} 
	else															   
	{
		document.getElementById('window_data').innerHTML="";
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function goldmember_select1()
{
	if (document.getElementById('type1').checked==true)
		document.getElementById('form1').submit();
	if (document.getElementById('type2').checked==true)
		document.getElementById('form2').submit();
	if (document.getElementById('type3').checked==true)
		document.getElementById('form3').submit();
}


function select_r(value)
{
	for(i=1;i<=3;i++)
		document.getElementById('type'+i).checked=false;
	document.getElementById('type'+value).checked=true;
}

//goldmember

//messages

function getmessageinfo(id,expand,div)
{				
	if(id>0)												 
		xmlhttpPost('profile_iframe.php?command=view_message&id='+id+'&expand='+expand,div,'','',1);
}


function loadmessagepage(page_nr)
{								   
	document.getElementById('message_list').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=view_message_list&page_nr='+page_nr,'message_list','','',1);
}

function deletemessage(id)
{								  
	if(id>0)
		if (confirm(q_delete_message)) {
			document.getElementById('message_list').innerHTML=document.getElementById('buffer_loader').innerHTML;
			xmlhttpPost('profile_iframe.php?command=delete_message&id='+id,'message_list','','',1);
		}
}


//messages

//pimp


function delete_pimp_background() {
	if (confirm(delete_message)==1) {
		document.form1.command.value='delete'; 
		document.form1.submit();
	}
}
 

//pimp

//options
function autoSave_option(ID, UserType, Type) {
	var form=_get('generalMailForm');
	var checkboxValue;
	
	switch (Type) {
		case 1:
			if (form.GlobalNotifications.checked==false) checkboxValue=0;
				else checkboxValue=1;
				
			xmlhttpPost('options.php?ajax=1&action=UpdateGlobalNotification&UserID='+ID+'&UserType='+UserType+'&Value='+checkboxValue,'','','',0);
			
			_get('saveGlobalNotification').innerHTML=langSaved;
			timeout=setTimeout("_get('saveGlobalNotification').innerHTML=''", 1500);
		break;
		case 2:
			if (form.CommentsNotifications.checked==false) checkboxValue=0;
				else checkboxValue=1;
				
			xmlhttpPost('options.php?ajax=1&action=UpdateCommentsNotification&UserID='+ID+'&UserType='+UserType+'&Value='+checkboxValue,'','','',0);
			
			_get('saveCommentsNotification').innerHTML=langSaved;
			timeout=setTimeout("_get('saveCommentsNotification').innerHTML=''", 1500);
		break;
	}
}

function modifyUpdates(element, ArtistID, Type) {
	if (element.checked==false) checkboxValue=0;
		else checkboxValue=1;
	
	xmlhttpPost('options.php?ajax=1&action=ModifyUpdates&ArtistID='+ArtistID+'&Type='+Type+'&Value='+checkboxValue,'','','',0);
	
	_get('updates_'+Type+'_'+ArtistID).innerHTML=langSaved;
	setTimeout("_get('updates_"+Type+"_"+ArtistID+"').innerHTML=''", 1500);
}

function unblock(ID) {
	xmlhttpPost('options.php?ajax=1&action=DeleteBlock&BlockID='+ID+'','blocked_'+ID,'','',1);
	
	timeout=setTimeout("_get('blocked_"+ID+"').style.display='none'", 3000);
}

//window

function hide_all_windows()
{
	showCalendar(0);
}

//window


//calendar

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 dateshowopadd2(opacity_c)
{
	if (opacity_c<10)
	{
		if (document.getElementById('datewindow'))
			document.getElementById('datewindow').className='windowmain'+opacity_c+'0';	
		opacity_c=opacity_c+2;
		opacity_timer=setTimeout('dateshowopadd2('+opacity_c+')',10);
	} else 
	{
		if (document.getElementById('datewindow')) {
			document.getElementById('datewindow').className='windowmain';		
			document.getElementById('datewindow').style.top=-1000;
			document.getElementById('datewindow').style.left=-1000;		
		}
	}
}

function showCalendar(visible,type,target)
{			
	if ( visible==1 ) {
		document.getElementById('datewindow_data').innerHTML='<img src="img/loading.gif">';

		if (target=='')
			var new_date=document.getElementById('new_date').value;
		else
			eval("var new_date=parent."+target+".document.getElementById('new_date').value;");
		
		xmlhttpPost('wnd_calendar.php?&type='+type+'&date='+new_date+'&field_name=new_date&target='+target,'datewindow_data','','',1);
		
		if (document.getElementById('datewindow').className=='windowmain')
		{
			document.getElementById('datewindow').className='windowmain100';				
			if (target=='') {
				document.getElementById('datewindow').style.top=getY(document.getElementById('new_date_aux'))+3;			
				document.getElementById('datewindow').style.left=getX(document.getElementById('new_date_aux'))+parseInt(document.getElementById('new_date_aux').offsetWidth)+10;
			} else {
				document.getElementById('datewindow').style.top=getY(document.getElementById('book_frame'))+3;			
				document.getElementById('datewindow').style.left=getX(document.getElementById('book_frame'))+220+10;
			}
			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 dateresizeshow(w,h) {
	document.getElementById('datewindow').style.width=w;
	document.getElementById('datewindow').style.height=h;
}

function loadcalendar(month,year,fieldname,type,target) {
	xmlhttpPost('wnd_calendar.php?month='+month+'&year='+year+'&field_name='+fieldname+'&type='+type+'&target='+target,'datewindow_data','','',1);
}	

function selectDate(date,date_c,fieldname,type,target)
{			
	if (target=='') {
		document.getElementById(fieldname).value=date;
		document.getElementById(fieldname+'_aux').value=date_c;	
	} else {
		eval("parent."+target+".document.getElementById(fieldname).value=date;");
		eval("parent."+target+".document.getElementById(fieldname+'_aux').value=date_c;");
	}
	showCalendar(0);
}	

//calendar

//review

function showreview_form(visible) 
{	
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getRecensieWindow','window_data','','',1);	  							
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}	

function sendRecensie()
{

	document.getElementById('recensie_form').user_id.value=document.getElementById('user_id').value
	document.getElementById('recensie_form').user_type.value=document.getElementById('user_type').value
	document.getElementById('recensie_form').command.value='sendRecensie';
	document.getElementById('recensie_form').submit();
	
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	//xmlhttpPost('profile_iframe.php?command=sendRecensie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
} 

//review

//picture upload

function showupload_form(visible) 
{	
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getUploadPictureWindow','window_data','','',1);	
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

function sendUploadPicture()
{

	document.getElementById('recensie_form').user_id.value=document.getElementById('user_id').value
	document.getElementById('recensie_form').user_type.value=document.getElementById('user_type').value
	document.getElementById('recensie_form').command.value='sendUploadPicture';
	document.getElementById('recensie_form').submit();
	
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	//xmlhttpPost('profile_iframe.php?command=sendRecensie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
} 

function picture_tab_show() {
	if (document.getElementById('user_type')) {
		var user_type=parseInt(document.getElementById('user_type').value);
		switch (user_type){
			case 1:
				selectArtTabNew('pictures');			
				break;
			case 2:
				selectLisTabNew('pictures');
				break;
			case 3:
				selectPodTabNew('pictures');
				break;								
		}		
	}
}

function picture_tab_show_back() {
	if (document.getElementById('user_type')) {
		var user_type=parseInt(document.getElementById('user_type').value);
		switch (user_type){
			case 1:
				selectArtTabBackNew('pictures');			
				break;
			case 2:
				selectLisTabBackNew('pictures');
				break;
			case 3:
				selectPodTabBackNew('pictures');
				break;								
		}		
	}
}

//picture upload

//mail to friend

function showtell_a_friend(visible)
{
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getTellaFriend&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

function sendtell_a_friend()
{

	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value
	document.getElementById('form1').command.value='send';
	document.getElementById('form1').submit();
	
	//document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	//xmlhttpPost('profile_iframe.php?command=sendRecensie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
} 

//mail to friend

//book artist

function showbook_this_artist(visible)
{
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getBookArtist&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

function sendbook_artist()
{

	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value
	document.getElementById('form1').command.value='send';
	document.getElementById('form1').submit();
	
	//document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	//xmlhttpPost('profile_iframe.php?command=sendRecensie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
} 

//book artist


//colaborate

function showinvitation_for_collaboration(visible) 
{	
	hide_all_windows();																			
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getInvitationForCollaboration&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}	

function sendinvitecol()
{

	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value
	document.getElementById('form1').command.value='send';
	document.getElementById('form1').submit();
	
	//document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';
	//xmlhttpPost('profile_iframe.php?command=sendRecensie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&Date='+Date+'&Location='+Location+'&Place='+Place+'&Text='+Text,'window_data','','',1);	  					
} 

//colaborate


//heart

function sendHeart(visible)
{		
	document.getElementById('send_heart').className='shadowed';
	xmlhttpPost('profile_iframe.php?command=sendHeart&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'send_heart','','',1);
}

//heart


//favorit

function AddFavorit(visible)
{	
	document.getElementById('add_favorit').className='shadowed';
	xmlhttpPost('profile_iframe.php?command=AddFavorit&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'add_favorit','','',1);
}

//favorit


//block

function AddBlock(visible,val)
{	
	document.getElementById('add_block').className='shadowed';
	xmlhttpPost('profile_iframe.php?command=addblock&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&val='+val,'add_block','','',1);
}

//block

//played in my podcast

function showplayed_in_my_podcast(visible) 
{	
	hide_all_windows();																			
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getPlayedInMyPodcast&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function sendplayed_in_my_podcast() {
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value
	document.getElementById('form1').command.value='send';
	document.getElementById('form1').submit();	
}

//played in my podcast


//ad friend

function AddAsFriend(visible)
{	
	document.getElementById('add_friend').className='shadowed';
	xmlhttpPost('profile_iframe.php?command=AddAsFriend&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'add_friend','','',1);
}		
  												  
function AddAsFriendForm(visible)
{	
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=AddAsFriendForm','window_data','','',1);	
 	} 
	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()
{
	var music=document.getElementById('music_notification').value;
	var concert=document.getElementById('concert_notification').value;
	AddAsFriendForm(0);		
	document.getElementById('add_friend').className='shadowed';
	xmlhttpPost('profile_iframe.php?command=AddAsFriend&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&music='+music+'&concert='+concert,'add_friend','','',1);
}


//ad friend

//private msg

function showprivate_msg_form(visible) 
{	
	hide_all_windows();																			
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getSendPrivateMsg&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function send_private_msg() {
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value
	document.getElementById('form1').command.value='send';
	document.getElementById('form1').submit();	
}

//private_msg

//show invite to concert

function showinvite_friend_to_concert(visible)
{
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=getInviteFriendConcert&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);		
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	} 	
}

function send_invite_to_concert() {	
	if (document.form1.artist.value<1)	
		return;
	if (document.form1.concert.value<1)
		return;	
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value		
	document.form1.command.value="send";
	document.form1.submit();
}

//show invite to concert


//artist concerts

function show_concerts(limit) {
	//document.getElementById('artistConcerts').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_iframe.php?command=show_artist_concerts&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&limit='+limit,'artistConcerts','','',1);		
}

function show_concertsBackA(limit) {
	//document.getElementById('artistConcerts').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=show_artist_concerts&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&limit='+limit,'artistConcerts','','',1);		
}

//artist concerts


//profile backend


//podcaster data
function edit_podcaster_data() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreDataForm','podcasterDataLoc','','',1);
}

function edit_podcaster_data_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreDataFormCancel','podcasterDataLoc','','',1);
}

function edit_podcaster_data_save() {
	if (document.getElementById('form_podcaster_data')) {		
		document.getElementById('form_podcaster_data').command.value='getPodcastreDataFormSave';
		document.getElementById('form_podcaster_data').submit();
	}
}

function edit_podcaster_data2() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreData2Form','podcaster_info_data','','',1);
}

function edit_podcaster_data2_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreData2FormCancel','podcaster_info_data','','',1);
}

function edit_podcaster_data2_save() {
	if (document.getElementById('form_podcaster_data2')) {	
		/*
		if (document.getElementById('form_podcaster_data2').FName.value=='') {
			alert(document.getElementById('form_podcaster_data2').fname_text.value);
			document.getElementById('form_podcaster_data2').FName.focus();
			return ;
		}		
		if (document.getElementById('form_podcaster_data2').LName.value=='') {
			alert(document.getElementById('form_podcaster_data2').lname_text.value);
			document.getElementById('form_podcaster_data2').LName.focus();
			return ;
		}			
		if (document.getElementById('form_podcaster_data2').City.value=='')	{
			alert(document.getElementById('form_podcaster_data2').city_text.value);
			document.getElementById('form_podcaster_data2').City.focus();
			return ;
		}
		*/
		document.getElementById('form_podcaster_data2').command.value='getPodcastreData2FormSave';
		document.getElementById('form_podcaster_data2').submit();
	}
}

function edit_podcaster_data2_hide_select(visible) {
	if (document.getElementById('form_podcaster_data2'))
		if (visible==1)
			document.getElementById('form_podcaster_data2').Region.style.visibility='visible';
		else
			document.getElementById('form_podcaster_data2').Region.style.visibility='hidden';
}

//podcaster xml
function edit_podcaster_xml() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreXMLForm','edit_feed','','',1);
}

function edit_podcaster_xml_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getPodcastreXMLFormCancel','edit_feed','','',1);
}

function edit_podcaster_xml_save() {
	if (document.getElementById('form_podcaster_xml')) {		
		document.getElementById('form_podcaster_xml').command.value='getPodcastreXMLFormSave';
		document.getElementById('form_podcaster_xml').submit();
	}
}


//video

function addVideoForm(id) {
	xmlhttpPost('profile_backend_iframe.php?command=addVideoForm&id='+id,'video_line_'+id,'','',1);
}

function cancelVideoForm(id) {
	xmlhttpPost('profile_backend_iframe.php?command=cancelVideoForm&id='+id,'video_line_'+id,'','',1);
}

function saveVideoForm(id) {
	var target='listenerVideos';
	if (id>0)
		target='video_line_'+id;

	var video=escape(document.getElementById('VideoLink_'+id).value);	
	xmlhttpPost('profile_backend_iframe.php?command=saveVideoForm&id='+id+'&video='+video+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,target,'','',1);
	if (id==0)
		document.getElementById('video_line_0').innerHTML='';
}

function deleteVideo(id) {
	if (confirm(q_delete_video))
		xmlhttpPost('profile_backend_iframe.php?command=deleteVideoForm&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'listenerVideos','','',1);
}

//weblog

function addLogForm(id) {
	xmlhttpPost('profile_backend_iframe.php?command=addLogForm&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'log_line_'+id,'','',1);
}

function cancelLogForm(id) {
	xmlhttpPost('profile_backend_iframe.php?command=cancelLogForm&id='+id,'log_line_'+id,'','',1);
}

function saveLogForm(id) {
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value		
	document.form1.command.value="saveLogForm";
	document.form1.submit();	
}

function deleteLog(id) {
	if (confirm(q_delete_log))
		xmlhttpPost('profile_backend_iframe.php?command=deleteLog&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'listenerLogs','','',1);
}

//listener data

function edit_listener_data() {
	xmlhttpPost('profile_backend_iframe.php?command=getListenerDataForm','listenerDataLoc','','',1);
}

function edit_listener_data_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getListenerDataFormCancel','listenerDataLoc','','',1);
}

function edit_listener_data_save() {
	if (document.getElementById('edit_listener_data_form')) {
		document.getElementById('edit_listener_data_form').command.value='getListenerDataFormSave';
		document.getElementById('edit_listener_data_form').submit();
	}
}

function edit_listener_data_hide_select(visible) {
	if (document.getElementById('edit_listener_data_form'))
		if (visible==1)
			document.getElementById('edit_listener_data_form').Country.style.visibility='visible';
		else			
			document.getElementById('edit_listener_data_form').Country.style.visibility='hidden';
}

function edit_listener_data2() {
	xmlhttpPost('profile_backend_iframe.php?command=getListenerData2Form','feeds','','',1);
}

function edit_listener_data2_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getListenerData2FormCancel','feeds','','',1);
}

function edit_listener_data2_save() {
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value		
	document.form1.command.value="save";
	document.form1.submit();	
}



function deleteListenerTrack(ID)
{
	if (confirm(q_delete_track)) {
		page=document.getElementById('current_track_page').value;
		document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
		xmlhttpPost('profile_backend_iframe.php?command=deleteListenerTrack&id='+ID+'&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  
	}
} 

function ListenerTrackpage(page)
{       		
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=ListenerTrackpage&page='+page,'player_main','','',1);	
}  


function ListenerTrackChange(ID, Direction)
{
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=ListenerTrackChange&Direction='+Direction+'&ID='+ID,'player_main','','',1);	  
}


//listener data


//artist data

function edit_artist_data() {
	xmlhttpPost('profile_backend_iframe.php?command=getArtistDataForm','artistDataLoc','','',1);
}

function edit_artist_data_cancel() {
	xmlhttpPost('profile_backend_iframe.php?command=getArtistDataFormCancel','artistDataLoc','','',1);
}

function edit_artist_data_save() {
	if (document.getElementById('edit_artist_data_form')) {
		document.getElementById('edit_artist_data_form').command.value='getArtistDataFormSave';
		document.getElementById('edit_artist_data_form').submit();
	}
}

function edit_artist_data_hide_select(type,visible) {
	if (document.getElementById('edit_artist_data_form'))
		switch (type) {
			case 1:
				if (visible==1) {
					document.getElementById('edit_artist_data_form').Region.style.visibility='visible';
					document.getElementById('edit_artist_data_form').Country.style.visibility='visible';
				} else {
					document.getElementById('edit_artist_data_form').Region.style.visibility='hidden';
					document.getElementById('edit_artist_data_form').Country.style.visibility='hidden';
				}
				break;
			case 2:
				if (visible==1) {
					document.getElementById('edit_artist_data_form').Country.style.visibility='visible';
				} else {
					document.getElementById('edit_artist_data_form').Country.style.visibility='hidden';
				}
				break;				
		}
}

function select_bumastema(val) {
	document.getElementById('bumstema').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=bumstema&val='+val+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'bumstema','','',1);
}

function addAlbumFrame(id,visible) {
	hide_all_windows();
	if ( visible==1 ) {
		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=260;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+200;
			document.getElementById('window').style.width=425;
			document.getElementById('window').style.height=206;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(425,206)',10);
			//alert(document.getElementById('added_friend').value);
		}	
		xmlhttpPost('profile_backend_iframe.php?command=addAlbumFrame&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}

function addTrackFrame(id,visible) {	
	hide_all_windows();
	if ( visible==1 && document.getElementById('current_album_id').value>0 ) {
		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=260;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+200;
			document.getElementById('window').style.width=425;
			document.getElementById('window').style.height=206;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(425,206)',10);
			//alert(document.getElementById('added_friend').value);
		}	
		xmlhttpPost('profile_backend_iframe.php?command=addTrackFrame&id='+id+'&album_id='+document.getElementById('current_album_id').value+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}		
}

function new_track_upload() {
	if (confirm(q_delete_track)) {
		document.getElementById('track_name_holder').style.display='none';
		document.getElementById('track_upload_holder').style.display='block';
		document.getElementById('new_upload').value=1;
	}
}

function sendAddAlbum() {
	hide_all_windows();
	document.getElementById('recensie_form').user_id.value=document.getElementById('user_id').value
	document.getElementById('recensie_form').user_type.value=document.getElementById('user_type').value
	document.getElementById('recensie_form').command.value='sendAddAlbum';
	document.getElementById('recensie_form').submit();

	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';	
}

function sendAddTrack(artist_ass) {
	hide_all_windows();

	if (artist_ass==1) {
		if (document.getElementById('license01').checked==false && document.getElementById('license02').checked==false)
		{
			alert(ian_alert1);		
			return false;
		}
		if (document.getElementById('license02').checked==true)
		{
			if (document.getElementById('license11').checked==false && document.getElementById('license12').checked==false)	
			{
				alert(ian_alert2);		
				return false;		
			}
			if (document.getElementById('license21').checked==false && document.getElementById('license22').checked==false && document.getElementById('license23').checked==false)	
			{
				alert(ian_alert1);		
				return false;		
			}		
		}	
	}
	
	document.getElementById('recensie_form').user_id.value=document.getElementById('user_id').value;
	document.getElementById('recensie_form').user_type.value=document.getElementById('user_type').value;
	document.getElementById('recensie_form').selected_album.value=document.getElementById('current_album_id').value;
	document.getElementById('recensie_form').command.value='sendAddTrack';
	document.getElementById('recensie_form').submit();

	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';		
}

function albumpage(page,id) {
	document.getElementById('playerMainContent').style.height='26px';	
	document.getElementById('playerMainContent').innerHTML='<a href="javascript:addAlbumFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_album_text+'"  align="absmiddle"></a> <a href="javascript:addAlbumFrame(0,1)" class="add_video_link">'+add_new_album_text+'</a>';	
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=page_albums&page='+page+'&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);
}  

function deleteAlbum(AlbumID) {					 
	if (confirm(q_delete_album)) {
		if (parseInt(document.getElementById('current_album_id').value)==parseInt(AlbumID)) {
			document.getElementById('current_album_id').value=0;
			document.getElementById('album_image').style.visibility='hidden';		
			document.getElementById('album_image').src='';
			document.getElementById('musicalbumtitle').innerHTML='';			
		}
		document.getElementById('playerMainContent').style.height='26px';	
		document.getElementById('playerMainContent').innerHTML='<a href="javascript:addAlbumFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_album_text+'" align="absmiddle"></a> <a href="javascript:addAlbumFrame(0,1)" class="add_video_link">'+add_new_album_text+'</a>';

		page=document.getElementById('current_album_page').value;
		document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
		xmlhttpPost('profile_backend_iframe.php?command=deleteAlbum&album_id='+AlbumID+'&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  
	}
}

function editAlbumOrderUp(AlbumId)
{
	document.getElementById('playerMainContent').style.height='26px';	
	document.getElementById('playerMainContent').innerHTML='<a href="javascript:addAlbumFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_album_text+'"  align="absmiddle"></a> <a href="javascript:addAlbumFrame(0,1)" class="add_video_link">'+add_new_album_text+'</a>';
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=albumorderup&album_id='+AlbumId+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  	
}

function editAlbumOrderDown(AlbumId)
{
	document.getElementById('playerMainContent').style.height='26px';	
	document.getElementById('playerMainContent').innerHTML='<a href="javascript:addAlbumFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_album_text+'"  align="absmiddle"></a> <a href="javascript:addAlbumFrame(0,1)" class="add_video_link">'+add_new_album_text+'</a>';
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=albumorderdown&album_id='+AlbumId+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  	
}

function selectalbum(SelectedId,AlbumName,AlbumImage) 
{	
	document.getElementById('current_album_id').value=SelectedId;		
	document.getElementById('album_image').style.visibility='visible';		
	document.getElementById('album_image').src=AlbumImage;
	document.getElementById('musicalbumtitle').innerHTML=AlbumName;	
	SelectTracksTab();
	//xmlhttpPost('artiesten_info.php?do=select_albums&SelectedId='+SelectedId,'musicPlayer','','',1);	  		
} 

function trackpage(page,seleted_id)
{       
	document.getElementById('playerMainContent').style.height='26px';	
	document.getElementById('playerMainContent').innerHTML='<a href="javascript:addTrackFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_track_text+'" align="absmiddle"></a> <a href="javascript:addTrackFrame(0,1)" class="add_video_link">'+add_new_track_text+'</a>';
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	album_id=document.getElementById('current_album_id').value;
	xmlhttpPost('profile_backend_iframe.php?command=page_tracks&page='+page+'&album_id='+album_id+'&selected_id='+seleted_id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);
}  

function SelectTracksTab()
{
	if (document.getElementById('current_album_id').value>0) {
		document.getElementById('track_prev_page').style.display='';				
		document.getElementById('track_next_page').style.display='';
		document.getElementById('album_prev_page').style.display='none';				
		document.getElementById('album_prev_page').style.display='none';								
		document.getElementById('playerMainContent').style.height='26px';	
		document.getElementById('playerMainContent').innerHTML='<a href="javascript:addTrackFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_track_text+'" align="absmiddle"></a> <a href="javascript:addTrackFrame(0,1)" class="add_video_link">'+add_new_track_text+'</a>';		
		
		document.getElementById('track01').style.background='url(img/ear_left_red.gif)';
		document.getElementById('track02').style.background='url(img/ear_middle_red.gif)';
		document.getElementById('track03').style.background='url(img/ear_right_red.gif)';		
		document.getElementById('album01').style.background='url(img/ear_left.gif)';
		document.getElementById('album02').style.background='url(img/ear_middle.gif)';
		document.getElementById('album03').style.background='url(img/ear_right.gif)';		
		
		document.getElementById('add_album_info_set').value=1;
		document.getElementById('add_album_info').style.display='none';

		trackpage(0,0);
		//xmlhttpPost('artiesten_info.php?do=list_tracks&album_id='+document.getElementById('current_album_id').value,'player_main','','',1);	
	}	
}

function SelectAlbumTab()
{
	document.getElementById('track_prev_page').style.display='none';				
	document.getElementById('track_next_page').style.display='none';
	document.getElementById('album_prev_page').style.display='';				
	document.getElementById('album_prev_page').style.display='';
	document.getElementById('playerMainContent').style.height='26px';
	document.getElementById('playerMainContent').innerHTML='<a href="javascript:addAlbumFrame(0,1)"><img src="img/icons/add.gif" border="0" alt="'+add_new_album_text+'"  align="absmiddle"></a> <a href="javascript:addAlbumFrame(0,1)" class="add_video_link">'+add_new_album_text+'</a>';
	document.getElementById('album01').style.background='url(img/ear_left_red.gif)';
	document.getElementById('album02').style.background='url(img/ear_middle_red.gif)';
	document.getElementById('album03').style.background='url(img/ear_right_red.gif)';		
	document.getElementById('track01').style.background='url(img/ear_left.gif)';
	document.getElementById('track02').style.background='url(img/ear_middle.gif)';
	document.getElementById('track03').style.background='url(img/ear_right.gif)';		
	if (parseInt(document.getElementById('add_album_info_set').value)==0) {
		document.getElementById('add_album_info').innerHTML=no_album_info;
		document.getElementById('add_album_info').style.display='';
	}

	albumpage(0,document.getElementById('current_album_id').value);
	//xmlhttpPost('artiesten_info.php?do=page_albums','player_main','','',1);	
}

function deleteTrack(ID,album_id)
{
	if (confirm(q_delete_track)) {
		page=document.getElementById('current_track_page').value;
		document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
		xmlhttpPost('profile_backend_iframe.php?command=deleteTrack&id='+ID+'&album_id='+album_id+'&page='+page+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  
	}
} 


function TrackChange(ID, album_id, Direction)
{
	document.getElementById('player_main').innerHTML='<table cellpaddin=0 cellspacing=0 width=100% height=100% bgcolor=#6F6F6F><tr><td align=center valign=middle><img src="img/loading.gif"></td></tr></table>';
	xmlhttpPost('profile_backend_iframe.php?command=TrackChange&Direction='+Direction+'&ID='+ID+'&album_id='+album_id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'player_main','','',1);	  
}

function setlicens()
{
	var val=0;
	if (document.getElementById('license11').checked==true)
		val=0;
	if (document.getElementById('license12').checked==true)
		val=3;
	if (document.getElementById('license21').checked==true)
		val=val+0;
	if (document.getElementById('license22').checked==true)
		val=val+1;
	if (document.getElementById('license23').checked==true)
		val=val+2;					
	document.getElementById('TrackLicense').value=val;
}

function select1(val)
{
	document.getElementById('license11').checked=false;
	document.getElementById('license12').checked=false;
	document.getElementById('license'+val).checked=true;
	setlicens();
}

function select2(val)
{
	document.getElementById('license21').checked=false;
	document.getElementById('license22').checked=false;
	document.getElementById('license23').checked=false;
	document.getElementById('license'+val).checked=true;
	setlicens();
}

function bs(val) {
	document.getElementById('license01').checked=false;
	document.getElementById('license02').checked=false;
	document.getElementById('license0'+val).checked=true;
	if (val==2)
	{
		document.getElementById('checkboxes').style.display='';
		setlicens();
	}	
	else
	{
		document.getElementById('checkboxes').style.display='none';
		document.getElementById('TrackLicense').value=-1;
	}
}

function addConcertForm(id,visible) {
	hide_all_windows();
	if ( visible==1 ) {
		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=240;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+300;
			document.getElementById('window').style.width=375;
			document.getElementById('window').style.height=410;				
			setTimeout('showopadd('+9+')',10);
		} else {			
			setTimeout('resizeshow(375,410)',10);
		}
		xmlhttpPost('profile_backend_iframe.php?command=addConcertForm&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}

function SaveConcert() {
	document.getElementById('recensie_form').user_id.value=document.getElementById('user_id').value
	document.getElementById('recensie_form').user_type.value=document.getElementById('user_type').value
	document.getElementById('recensie_form').command.value='SaveConcert';
	document.getElementById('recensie_form').submit();
	
	document.getElementById('window_data').innerHTML='<img src="img/loading.gif">';	
}


//artist data

//profile main image selector
function showmain_photo(visible) 
{						
	if ( visible==1 ) {
		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=160;
			var tableleft=getX(document.getElementById('total'));
			document.getElementById('window').style.left=tableleft+450;
			document.getElementById('window').style.width=440;
			document.getElementById('window').style.height=360;				
			setTimeout('showopadd('+9+')',40);
		} else {			
			setTimeout('resizeshow(440,360)',10);
			//alert(document.getElementById('added_friend').value);
		}	
		xmlhttpPost('profile_backend_iframe.php?command=getMainThumb','window_data','','',1);	
 	} 
	else															   
	{
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}
}

function deleteFriend(id) {
	if (confirm(q_delete_friend)) {
			document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deleteFriend&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
	}
}

function addImageForm(id,visible) {
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_backend_iframe.php?command=getUploadPictureWindow&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'window_data','','',1);	
 	} 
	else															   
	{		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}

function deletePicture(id) {
	if (confirm(q_delete_picture)) {
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deletePicture&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);
	}
}

function select_main_thumb(id) {	
	var old=document.getElementById('selected_main').value;
	if (old!=0)
		document.getElementById('sel_thumb_img_'+old).style.display='none';
	document.getElementById('sel_thumb_img_'+id).style.display='';
	document.getElementById('selected_main').value=id;
}

function select_main_photo() {
	id=0;
	if (document.getElementById('selected_main')) {
		var id=document.getElementById('selected_main').value;
		if (id>0) {
			document.getElementById('main_picture_holder').innerHTML=document.getElementById('buffer_loader').innerHTML;
			xmlhttpPost('profile_backend_iframe.php?command=show_main_photo&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'main_picture_holder','','',1);
		}
	}
	showmain_photo(0);
}

function deletePodcast(id) {
	if (confirm(q_remove_artist)) { 
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deletePodcast&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
	}
}

function editBiografie() {
	document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
	xmlhttpPost('profile_backend_iframe.php?command=editBiografie&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
}

function sendbiografie() {
	document.getElementById('form1').user_id.value=parent.document.getElementById('user_id').value
	document.getElementById('form1').user_type.value=parent.document.getElementById('user_type').value		
	document.form1.command.value="save";
	document.form1.submit();	
}

function infoConcertBack(ConcertID,expand)
{				
	if (ConcertID>0) 
		xmlhttpPost('profile_backend_iframe.php?command=print_concert_info_profile&ConcertID='+ConcertID+'&expand='+expand,'concert_line_'+ConcertID,'','',1);
}

function infoConcertBackA(ConcertID,expand)
{				
	if (ConcertID>0) 
		xmlhttpPost('profile_backend_iframe.php?command=print_concert_info_artist&ConcertID='+ConcertID+'&expand='+expand,'concert_line_'+ConcertID,'','',1);
}

function deleteConcertInfo(ConcertID) {
	if (ConcertID>0 && confirm(q_delete_concert_from_list)) {
		document.getElementById('concertsinfodiv').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deleteConcertInfo&ConcertID='+ConcertID+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'concertsinfodiv','','',1);	
	}
}

function deleteConcert(ConcertID) {
	if (ConcertID>0 && confirm(q_delete_concert)) {
		limit=document.getElementById('limit_concert').value;	
		document.getElementById('artistConcerts').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deleteConcert&ConcertID='+ConcertID+'&limit='+limit+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'artistConcerts','','',1);
	}
}

function deletePodcastArtist(id) {
	if (confirm(q_delete_podcast)) { 
		document.getElementById('ContentTabs').innerHTML=document.getElementById('buffer_loader').innerHTML;
		xmlhttpPost('profile_backend_iframe.php?command=deletePodcastArtist&id='+id+'&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'ContentTabs','','',1);	
	}
}

//profile backend

function show_interview_back() {
	alert(disabled_option___);
	return;
}

//bets

function check_bet(visible) {	
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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);
		}
		var bet=document.getElementById('bet').value;
		xmlhttpPost('profile_iframe.php?command=check_bet&bet='+bet,'window_data','','',1);	
	} else {		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}

function set_bet(visible,bet) {	
	hide_all_windows();
	if ( visible==1 ) {
		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=getX(document.getElementById('total'));
			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('profile_iframe.php?command=set_bet&bet='+bet,'window_data','','',1);					
	} else {		
		opacity_timer=setTimeout('showopadd2('+1+')',10);
		hide_black();
	}	
}

function load_bet_list() {
	document.getElementById('bet').value='';	
	document.getElementById('bet_list').innerHTML='<img src="img/loading.gif">';	
	xmlhttpPost('profile_iframe.php?command=load_bet_list','bet_list','','',1);
}


//listener credits
function colorCredits(mode) {
	if (mode==0)
		document.getElementById('totalCredits').className='statisticsAlternate';
	else 
		document.getElementById('totalCredits').className='statisticsSelected';
}

function changeCredits(listener) {
	xmlhttpPost('profile_iframe.php?command=edit_credits&listener_id='+listener,'totalCredits','','',1);
}

function editCredits(mode, listener) {
	var credits=document.getElementById('creditsValue').value;
	xmlhttpPost('profile_iframe.php?command=show_credits&mode='+mode+'&listener_id='+listener+'&credits='+credits,'totalCredits','','',1);
}

//goldmember update
function edit_goldmember() {
	xmlhttpPost('profile_iframe.php?command=showgoldmemberform&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value,'userHeader','','',1);						
}

function cancel_gold() {
	xmlhttpPost('profile_iframe.php?command=cancelgoldmemberform&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').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;
	xmlhttpPost('profile_iframe.php?command=showgoldmemberform&user_id='+document.getElementById('user_id').value+'&user_type='+document.getElementById('user_type').value+'&save='+1+'&is_gold='+is_gold+'&day='+day+'&month='+month+'&year='+year+'&nr='+nr+'&type='+type,'userHeader','','',1);						
}
