var tab_current = 1;
var max_features = 1; //please set real features count in features view
// var timer;
function showtab(number) {
	// if (tab_current==number) return;
	//hide previous tab
	tab = document.getElementById('tab'+tab_current);
	tab.className = '';
	info = document.getElementById('info'+tab_current);
	info.className = '';
	//make current tab highlighted
	tab = document.getElementById('tab'+number);
	tab.className = 'current';
	info = document.getElementById('info'+number);
	info.className = 'current';
//	alert(tab.className);
	tab_current = number;
	// setAutoTimer();
	}

function showNextTab() {
	next = tab_current+1;
	if (next>max_features) next=1;
	//alert(tab_current);
	showtab(next);
	}

// function setAutoTimer() {
// 	if (timer) {window.clearInterval(timer);}
// 	timer = window.setInterval(showNextTab, 20000);
// 	}

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}