//RIGHT-CLICK DisAllowed
if (true) {
var message="Copyright XBN Media";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
} // if false or true
//END NO-RIGHT-CLICK


function gettodayspicbyelem(picno) {
var todaysdate = new Date()  
var dayofmonthdigit = todaysdate.getDate()  // 1 - 31
var monthofyeardigit = todaysdate.getMonth() + 1
var todayspicstr=""

dom = dayofmonthdigit
moy = monthofyeardigit

approxdayofyeardigit =  ((moy-1) * 30) + dom
adoy = approxdayofyeardigit
adoy = adoy % 218 // because only 218 uploaded // modulo

//alert(dom)
//alert(moy)
//alert(adoy)
adoy = adoy + 59; // So it is not the same as newsletter xbotd pic
// following lines because only 218 pics loaded now
if (adoy>218) {adoy = adoy - 218 }
if (adoy>218) {adoy = adoy - 218 }

todayspicstr= "" + adoy
if (adoy<10) {todayspicstr="00"+todayspicstr}
else {
if (adoy<100)  {todayspicstr="0"+todayspicstr}
};

todayspicstr = "/images/xbotd/PS" + todayspicstr + ".jpg"

// document.images[picno].src=todayspicstr
// return todayspicstr

var img = document.getElementById("xbotd");
img.src = todayspicstr;

} // end gettodayspicbyelem()


function gettodayspic(picno) {
var todaysdate = new Date()  
var dayofmonthdigit = todaysdate.getDate()  // 1 - 31
var monthofyeardigit = todaysdate.getMonth() + 1
var todayspicstr=""

dom = dayofmonthdigit
moy = monthofyeardigit

approxdayofyeardigit =  ((moy-1) * 30) + dom
adoy = approxdayofyeardigit
adoy = adoy % 218 // because only 218 uploaded // modulo

//alert(dom)
//alert(moy)
//alert(adoy)

// following lines because only 218 pics loaded now
if (adoy>218) {adoy = adoy - (365 - 218) - 100 }
if (adoy>218) {adoy = adoy - (365 - 218) - 100 }
if (adoy>218) {adoy = adoy - (365 - 218) - 100 }

todayspicstr= "" + adoy
if (adoy<10) {todayspicstr="00"+todayspicstr}
else {
if (adoy<100)  {todayspicstr="0"+todayspicstr}
};

todayspicstr = "/images/xbotd/PS" + todayspicstr + ".jpg"

document.images[picno].src=todayspicstr
return todayspicstr
} // end gettodayspic()




function getweeksram() {
//alert("hi from testing2")

var todaysdate = new Date()  
var dayofmonthdigit = todaysdate.getDate()  // 1 - 31
var monthofyeardigit = todaysdate.getMonth() + 1
var weeksramstr=""

dom = dayofmonthdigit
moy = monthofyeardigit

approxdayofyeardigit =  ((moy-1) * 30) + dom
adoy = approxdayofyeardigit

//alert(dom)
//alert(moy)
//alert(adoy)

// following lines because only 224 rams loaded now
if (adoy>224) {adoy = adoy - (365 - 218) - 100 }
if (adoy>224) {adoy = adoy - (365 - 218) - 100 }
if (adoy>224) {adoy = adoy - (365 - 218) - 100 }
adoy = Math.round(adoy/7) // adoy now is the nth week of the year

adoy = adoy + 24 // do this to skip bndg videos

weeksramstr= "" + adoy
if (adoy<10) {weeksramstr="00"+weeksramstr}
else {
if (adoy<100)  {weeksramstr="0"+weeksramstr}
};

// weeksramstr = "/cgi-bin/axs/ax.pl?/x-boys/videos/votd/VC" + weeksramstr + ".ram" // Justhost is having a problem - wants to open 'ax.ram'
// weeksramstr = '/cgi-bin/axs/ax.pl?/x-boys/videos/votd/VC' + weeksramstr + '.ram' // Justhost also having same problem with this
weeksramstr = "/x-boys/videos/votd/VC" + weeksramstr + ".ram"  // But IE and Firefox ask to open or save VC051.ram anyway

document.write("<a href=" + weeksramstr + "><font size=+2>This Weeks Free CLASSIC OLDIES Videoclip</a></font>")

} // end getweeksram()


function gettodayscampicbyelem(picno) {
var todaysdate = new Date()  
var dayofmonthdigit = todaysdate.getDate()  // 1 - 31
var monthofyeardigit = todaysdate.getMonth() + 1
var todayscampicstr=""

dom = dayofmonthdigit
moy = monthofyeardigit

approxdayofyeardigit =  ((moy-1) * 30) + dom
adoy = approxdayofyeardigit
// 1,677 are uploaded as of 7-19-03
// adoy = adoy % 218 // because only 218 uploaded // modulo

//alert(dom)
//alert(moy)
//alert(adoy)

todayscampicstr= "" + adoy
if (adoy<10)   {todayscampicstr="0"+todayscampicstr};
if (adoy<100)  {todayscampicstr="0"+todayscampicstr};
if (adoy<1000) {todayscampicstr="0"+todayscampicstr};

todayscampicstr = "/x-boys/frames/icams/PS" + todayscampicstr + ".jpg"

// document.images[picno].src=todayscampicstr
// return todayscampicstr

var img = document.getElementById("campic");
img.src = todayscampicstr;

} // end gettodayscampicbyelem()


function gettodayscampic(picno) {
var todaysdate = new Date()  
var dayofmonthdigit = todaysdate.getDate()  // 1 - 31
var monthofyeardigit = todaysdate.getMonth() + 1
var todayscampicstr=""

dom = dayofmonthdigit
moy = monthofyeardigit

approxdayofyeardigit =  ((moy-1) * 30) + dom
adoy = approxdayofyeardigit
// 1,677 are uploaded as of 7-19-03
// adoy = adoy % 218 // because only 218 uploaded // modulo

//alert(dom)
//alert(moy)
//alert(adoy)

todayscampicstr= "" + adoy
if (adoy<10)   {todayscampicstr="0"+todayscampicstr};
if (adoy<100)  {todayscampicstr="0"+todayscampicstr};
if (adoy<1000) {todayscampicstr="0"+todayscampicstr};

todayscampicstr = "/x-boys/frames/icams/PS" + todayscampicstr + ".jpg"

document.images[picno].src=todayscampicstr
return todayscampicstr
} // end gettodayscampic()


function getQueryVariable(variable) { 
var query = window.location.search.substring(1); 
var vars = query.split("&"); 
for (var i=0;i<vars.length;i++) { 
var pair = vars[i].split("="); 
if (pair[0] == variable) { 
return pair[1]; 
} // if
} // for
// alert('Query Variable ' + variable + ' not found'); 
} // function


