// audio player embed
swfobject.embedSWF("/files/swf/audio.swf", "music_player", "185", "57", "7.0.0","/files/swf/expressInstall.swf", {clor: "666666",lclor: "f0f0f0",pclor: "eeeeee",UpperCase: "true"}, {menu: "false",wmode: "transparent"}, {id: "music_player",name: "music_player"});

// email obfuscate
function obfuscate(coded,title) {
 cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
 shift=coded.length
 link=""
 for (i=0; i<coded.length; i++){
  if (cipher.indexOf(coded.charAt(i))==-1){
   ltr=coded.charAt(i)
   link+=(ltr)
  } else {     
   ltr = (cipher.indexOf(coded.charAt(i))-shift+cipher.length) % cipher.length
   link+=(cipher.charAt(ltr))
  }				
 }
 document.write("<a href='mailto:"+link+"'>"+title+"</a>");
}

// clear / restore
function clearDefault(el) {
 if (el.defaultValue==el.value) el.value = "";
}

function putDefault(el) {
 if (el.value=="") el.value = el.defaultValue;
}

// toggle
function toggle(targetId) {
 var target = document.getElementById(targetId);
 if ( target.style.display == "none" ) {
  target.style.display = "block";
  $('.page-content').jScrollPane({scrollbarWidth:8});
 } else {
  target.style.display = "none";				
  $('.page-content').jScrollPane({scrollbarWidth:8});
 }
}
