
// Scrolling Portfolio
var sp=1; // pixel scroll speed 
function pScroll() {
 var box = document.getElementById('folio');
 var div = box.getElementsByTagName('div');
 var px=0;
 for(i=0; i<div.length; i++) {
  px = parseInt(div[i].style.left) - sp;
  if(px<-200) { px+=1000; }
  div[i].style.left = px + 'px';
 }
 setTimeout('pScroll()', 30);
}


// open any links not on this host in a new window
function extLinks() {
 var links=document.getElementsByTagName('a'), host=window.location.hostname; 
 for(l=0; l<links.length; l++) {
  if(( links[l].href.substr(0, 7+host.length)!='http://'+host ) && ( links[l].href.substr(0, 7)=='http://' )){
   links[l].target='_blank';
  } 
 }
}

// send mailform
function send() {
 document.getElementById('mailform').submit();
}


// new captcha puzzle
function newCaptcha() {
 var ci=document.getElementById('captcha_image');
 ci.src='/captcha.php?'+Math.random();
}
 
