// needed for the contact links funtion to work properly
    function getDisplayFriendID() { return MySpace.ClientContext.DisplayFriendId; }
    
// required for add this javascript
    addthis_offset_top      = 0;
    addthis_offset_top_low  = 0;
    addthis_offset_left     = 0;

// video swapper function
//function writeVideo(p,a) 
//{
//document.getElementById('video_player').innerHTML = '<embed type="application/x-shockwave-flash" allowScr'+'iptAccess="sameDomain" allowFullScreen="true" src="http://mediaservices.myspace.com/services/media/embed.aspx/m='+p+',t=1,mt=video,ap='+a+'" height="351" //width="468" id="vplayer" bgcolor="#a40616" quality="high" flashvars="m='+p+'&amp;hb=false;" />';
//}



// video swapper function
function writeVideo(p) 
{
document.getElementById('video_player').innerHTML = '<embed type="application/x-shockwave-flash" allowScr'+'iptAccess="sameDomain" allowFullScreen="true" src="http://mediaservices.myspace.com/services/media/embed.aspx/m='+p+',t=1,mt=video,ap=0" height="351" width="468" id="vplayer" bgcolor="#a40616" quality="high" flashvars="m='+p+'&amp;hb=false;" />';
}




// check login for featured product

function checkLogin(){
	return isLoggedIn > -1 ? {isLoggedIn:"true",userID:isLoggedIn,photoURL:imageUrl} : {isLoggedIn:"false"};
}

function promptLogin(){
	var encodedUrl ="MIGUBgkrBgEEAYI3WAOggYYwgYMGCisGAQQBgjdYAwGgdTBzAgMCAAECAmYDAgIAwAQI2gQZO9lye2kEEAI8rTEzlRjGd3XglQUL6zMESH5rFBETj0nDmDdmunkBWv2h0e7oY2ddMmNsyj20enKDJdQQj9zzYOUL2zRuxCuqJsgM4L79igjBTakRHs2VwBUSShWpSiPz0Q%3d%3d";
	var today = new Date();
	today.setTime( today.getTime() );
	var expires_date = new Date( today.getTime() + (1000 * 60 * 60) );
	var cookie = document.cookie = "Login=" + encodedUrl + "; path=/; domain=.myspace.com; expires=" + expires_date.toGMTString() + ";";
	window.location = "http://www.myspace.com";
}





// Check zip code




<!-- Begin
function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.length!=5 && field.length!=10) {
alert("Please enter your 5 digit or 5 digit+4 zip code.");
return false;
}
for (var i=0; i < field.length; i++) {
temp = "" + field.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("You have invalid characters in your zip code.  Please try again.");
return false;
}
if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}