/**********************************************************
 * Bookmark this site                                     *
 **********************************************************/
function addfav() {
  var tit = document.title;
  var pag = location.href;

  if ( navigator.appName != 'Microsoft Internet Explorer' )
  { window.sidebar.addPanel(tit,pag,""); }
  else { window.external.AddFavorite(pag,tit); }
}


/**********************************************************
 * External window                                        *
 **********************************************************/

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;


/**********************************************************
 * Hide from email robots                                 *
 **********************************************************/
 
function nospam(user,domain,subject) {
	locationstring = "mailto:" + user + "@" + domain + "?subject=" + subject;
	window.location = locationstring;
}


/**********************************************************
 * Pop window                                        *
 **********************************************************/
  function comwindow(SITE,SWIDTH,SHEIGHT,REZIZE) {
  window.open(SITE,'jav','width=' +SWIDTH+ ',height=' +SHEIGHT+ ',resizable=' +REZIZE+ ',scrollbars=yes'); 
  }

/**********************************************************
 * Toggle display                                        *
 **********************************************************/

  function toggle_visibility(id1, id2, id3, id4) {
	var e = document.getElementById(id1 + '_t');
	var f = document.getElementById(id2 + '_t');
	var g = document.getElementById(id3 + '_t');
	var h = document.getElementById(id4 + '_t');


  if(id1 == 'w') {
  e.style.display = 'block';
	f.style.display = 'none';
	g.style.display = 'none';
	h.style.display = 'none';

	var i = document.getElementById(id2 + '_g');
	var j = document.getElementById(id3 + '_g');
	var k = document.getElementById(id4 + '_g');
	i.src='http://www.side2.com/media/img/' + id2 + '.gif';
	j.src='http://www.side2.com/media/img/' + id3 + '.gif';
	k.src='http://www.side2.com/media/img/' + id4 + '.gif';
	}
	else{
  e.style.display = 'block';
	f.style.display = 'none';
	g.style.display = 'none';
	h.style.display = 'none';

	var i = document.getElementById(id1 + '_g');
	var j = document.getElementById(id3 + '_g');
	var k = document.getElementById(id4 + '_g');		
	i.src='http://www.side2.com/media/img/' + id1 + '_on.gif';
	j.src='http://www.side2.com/media/img/' + id3 + '.gif';
	k.src='http://www.side2.com/media/img/' + id4 + '.gif';
	}


	

	}
	
  function changeimage(id, sMinus, sPlus) {   
    var img = document.getElementById(id);  
    (img!=null)   
    {   
    var bExpand = img.src.indexOf(sPlus) >= 0;   
    if (!bExpand)   
    img.src = sPlus;   
    else   
    img.src = sMinus;   
    }   
  }
  
  function clearText(thefield){
  if (thefield.defaultValue==thefield.value)
  thefield.value = ""
  }
	
	function validateEmpty(fld) {
    var error = "";
  
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = "The required field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;   
}