var oas = 'http://ads.mgnetwork.com/RealMedia/ads/';
var RN = new String (Math.random());
var RNS = RN.substring (2,11);

function DisplayOasAd (position) {
	var oaspage = sitepage + '/1' + RNS + '@' + position;
	if (_version < 11) {
		document.write ('<a href="' + oas + 'click_nx.ads/' + oaspage + '" target="_top"><img src="' + oas + 'adstream_nx.ads/' + oaspage + '" border="0"></a>');
	}
	else {
		document.write ('<script language="JavaScript1.1" src="' + oas + 'adstream_jx.ads/' + oaspage + '"><\/script>');
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function addIEFavorite() {
	if (window.external) {
		external.AddFavorite(location.href, document.title);
	}
	else {
		alert("Oops, your browser doesn't support this feature.\n" +
		"If you are using Netscape Navigator, click Bookmarks\n" +
		"and then Add Bookmark to add this site to your favorites.");
	}
}

function Vote() {
	isChecked = false;
	targetWin = "pollpage";
	for( i = 0; i < document.voteform.ITEM1.length; i++ ) {
		if (document.voteform.ITEM1[i].checked) {
			isChecked = true;
		}
	}
	if(isChecked) {
		window.open("", targetWin,"toolbar=no,scrollbars=yes,directories=no, status=no,menubar=no,resizable=no,width=400,height=400")
		document.voteform.target = targetWin;
		document.voteform.submit();
	}
	else {
		alert("Sorry, but you forgot to vote\nPlease try again");
	}
}

function createWindow(pageURL,wWidth,hHeight) {
	window.open(pageURL, "secondWindow", "toolbar=no,scrollbars=yes,directories=no, status=no,menubar=no,resizable=no,width=" + wWidth + ",height=" + hHeight)
}

function getAppVersion() {
	appname= navigator.appName;
	appversion = navigator.appVersion;
	majorver = appversion.substring(0, 1);
	if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;
	if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
	return 0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function writeToStatusBar(text) {
	window.status = text;
}

function VoteWindow() {
	window.open("/blank.htm","pollpage","toolbar=no,scrollbars=yes,directories=no, status=no,menubar=no,resizable=no,width=400,height=400")
}

function createWindow(pageURL,wWidth,hHeight) {
	window.open(pageURL, "secondWindow", "toolbar=no,scrollbars=yes,directories=no, status=no,menubar=no,resizable=no,width=" + wWidth + ",height=" + hHeight)
}

function openPic(PictureURL)
{
var newWin = window.open(PictureURL,"largePicture","width=475,height=400,resizable=no,scrollbars=yes,menubar=no,toolbar=no");
}

function openPic2(Picture2URL)
{
var newWin = window.open(Picture2URL,"largePicture","width=475,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no");
}

function openPic3(Picture3URL)
{
var newWin = window.open(Picture3URL,"largePicture","width=475,height=400,resizable=no,scrollbars=yes,menubar=no,toolbar=no");
}

function openPic4(Picture4URL)
{
var newWin = window.open(Picture4URL,"largePicture","width=475,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no");
}

function openPic5(Picture5URL)
{
var newWin = window.open(Picture5URL,"largePicture","width=475,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no");
}


function writeDate() {
 var todaysDate = new Date();
 var today = todaysDate.getDay();
  if (today == 0) {day = "SUNDAY"};
  if (today == 1) {day = "MONDAY"};
  if (today == 2) {day = "TUESDAY"};
  if (today == 3) {day = "WEDNESDAY"};
  if (today == 4) {day = "THURSDAY"};
  if (today == 5) {day = "FRIDAY"};
  if (today == 6) {day = "SATURDAY"};
 var thisMonth = todaysDate.getMonth();
  if (thisMonth == 0) {month = "JANUARY"};
  if (thisMonth == 1) {month = "FEBRUARY"};
  if (thisMonth == 2) {month = "MARCH"};
  if (thisMonth == 3) {month = "APRIL"};
  if (thisMonth == 4) {month = "MAY"};
  if (thisMonth == 5) {month = "JUNE"};
  if (thisMonth == 6) {month = "JULY"};
  if (thisMonth == 7) {month = "AUGUST"};
  if (thisMonth == 8) {month = "SEPTEMBER"};
  if (thisMonth == 9) {month = "OCTOBER"};
  if (thisMonth == 10) {month = "NOVEMBER"};
  if (thisMonth == 11) {month = "DECEMBER"};
 document.write(day + ', ' + month + ' ' + todaysDate.getDate() + ', ' + todaysDate.getFullYear());
}

function writeShortDate() {
 var todaysDate = new Date();
 var today = todaysDate.getDay();
  if (today == 0) {day = "Sun"};
  if (today == 1) {day = "Mon"};
  if (today == 2) {day = "Tue"};
  if (today == 3) {day = "Wed"};
  if (today == 4) {day = "Thu"};
  if (today == 5) {day = "Fri"};
  if (today == 6) {day = "Sat"};
 var thisMonth = todaysDate.getMonth();
  if (thisMonth == 0) {month = "Jan"};
  if (thisMonth == 1) {month = "Feb"};
  if (thisMonth == 2) {month = "Mar"};
  if (thisMonth == 3) {month = "Apr"};
  if (thisMonth == 4) {month = "May"};
  if (thisMonth == 5) {month = "Jun"};
  if (thisMonth == 6) {month = "Jul"};
  if (thisMonth == 7) {month = "Aug"};
  if (thisMonth == 8) {month = "Sep"};
  if (thisMonth == 9) {month = "Oct"};
  if (thisMonth == 10) {month = "Nov"};
  if (thisMonth == 11) {month = "Dec"};
 document.write(day + ' ' +  month + ' ' + todaysDate.getDate());
}

