
var actualview = "vue1";
var actualselector = document.getElementById("selector1");
if (document.getElementById(actualview) != null){
	document.getElementById(actualview).style.display ='block';
}
if (actualselector != null){
	actualselector.style.color = '#c00';
}

function changeview(tag,newview){
document.getElementById(actualview).style.display ='none';
document.getElementById(newview).style.display ='block';
tag.style.color ='#c00';
actualselector.style.color = '#000';
actualview=newview;
actualselector=tag;
}

setInitialView();

// Read a page's GET URL variables and return them as an associative array.
function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');

    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }

    return vars;
}

function setInitialView()
{
   var hash = getUrlVars();

  var index = hash['vue'];
  if (index==undefined)
	return;
  var selector = "selector"+index;
   var newvue = "vue"+index;
  var newselector = document.getElementById(selector);
   changeview(newselector,newvue);
}


