var sFriendID = MySpace.ClientContext.DisplayFriendId;
var userID = MySpace.ClientContext.UserId;

function goForos(){
sTargetUrl = "http://forum.myspace.com/index.cfm?fuseaction=messageboard.viewcategory&type=friendForum&friendID="+sFriendID;
//location.href = sTargetUrl;
window.open(sTargetUrl,'title','toolbar=yes,location=yes,status=yes');
}

function subiFoto(){
if (isLoggedIn > 0) {
   url = "http://adsupport.myspace.com/index.cfm?fuseaction=advertiser.imagesubmission&submissionID=1101";
	newwin = window.open(url, 'title', 'height=532, width=566, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (566/2)), ((screen.height / 2) - (532/2)));
	newWin.focus();
 } else {
	alert("Para subir tu imagen, necesitas estar logueado.");
 }
}

function armaPrevia(){
   url = "http://adsupport.myspace.com/index.cfm?fuseaction=advertiser.imagegallery&galleryid=1101"
	newwin = window.open(url, 'title', 'height=532, width=566, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (566/2)), ((screen.height / 2) - (532/2)));
	newWin.focus();
}

function subiTema(){
if (isBand > 0) {
   url = "http://adsupport.myspace.com/index.cfm?fuseaction=advertiser.bandupload&bandcontestid=1102"
	newwin = window.open(url, 'title', 'height=450, width=628, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (628/2)), ((screen.height / 2) - (450/2)));
	newWin.focus();
 } else {
	alert("Para subir un tema, necesitas tener un perfil de m\372sico.");
 }
}

function escuchar(){
if (isLoggedIn > 0) {
   url = "http://adsupport.myspace.com/index.cfm?fuseaction=advertiser.bandgallery&gid=1102"
	newwin = window.open(url, 'title', 'height=450, width=628, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (628/2)), ((screen.height / 2) - (450/2)));
	newWin.focus();
 } else {
	alert("Para escuchar los temas, necesitas estar logueado.");
 }
}

function quiz(){
   url = "http://creative.myspacecdn.com/ar/doritos/contest/quiz.html"
	newwin = window.open(url, 'title', 'height=550, width=450, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (450/2)), ((screen.height / 2) - (550/2)));
	newWin.focus();
}

function quizPreparado(){
   url = "http://creative.myspacecdn.com/ar/doritos/contest/preparado.html"
	newwin = window.open(url, 'title', 'height=620, width=350, toolbar=no, scrollbars=no, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (350/2)), ((screen.height / 2) - (620/2)));
	newWin.focus();
}

function app(){
   sTargetUrl = "http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=122372"
window.open(sTargetUrl);
}

function terms(){
   url = "http://creative.myspacecdn.com/ar/doritos/contest/tc.html"
	newwin = window.open(url, 'title', 'height=550, width=520, toolbar=no, scrollbars=yes, resizable=no, status=no, copyhistory=no, location=no, menubar=no');
	newwin.moveTo(((screen.width / 2) - (520/2)), ((screen.height / 2) - (550/2)));
	newWin.focus();
}