var oas = 'http://ads.mgnetwork.com/RealMedia/ads/';
var RN = new String (Math.random());
var RNS = RN.substring (2,11);
var mgSiteID = 'WPN';

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 writeDate() {

	var todaysDate = new Date();

	var today = todaysDate.getDay();
		if (today == 0) { day = "Sun." };
		if (today == 1) { day = "Mon." };
		if (today == 2) { day = "Tues." };
		if (today == 3) { day = "Wed." };
		if (today == 4) { day = "Thurs." };
		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 = "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 = "Aug." };
		if (thisMonth == 8) { month = "Sept." };
		if (thisMonth == 9) { month = "Oct." };
		if (thisMonth == 10) { month = "Nov." };
		if (thisMonth == 11) { month = "Dec." };

	document.write (day + ', ' + month + ' ' + todaysDate.getDate() + ', ' + todaysDate.getFullYear() );

}


function MM_jumpMenu(targ,selObj,restore) {
         eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
         if (restore) selObj.selectedIndex=0;
}
