// Script for Post to MySpace (PTM) feature originally obtained from
//  developer documentation at http://www.myspace.com/posttomyspace

function ptm_click(imageUrl,blurb) {

   // imageUrl as PTM param must be absolute location
   if(imageUrl.indexOf('http')==-1)
      imageUrl='http://' + document.location.host + imageUrl;

   // params for PTM
   T=document.title;
   C='<div style=\'float: left\'>' + '<img src=\'' + imageUrl + 
      '\' width=\'125\' style=\'margin: 0 15px 0 0\'>' + '</div>' + 
      '<div style=\'vertical-align: top\'>' + blurb + '</div>'; //<br style=\'clear: both\' /><br />
   U=location.href;
   L='';
   
   // pass the defined params to PTM page and open
   window.open('http://www.myspace.com/index.cfm?fuseaction=postto&' + 't=' + 
      encodeURIComponent(T) + '&c=' + encodeURIComponent(C) + '&u=' + 
      encodeURIComponent(U) + '&l=' + L);
   
   return false;
}
