function stopErrors() {
	return true;
}
window.onerror = stopErrors;
self.onError = null;
da_image = new Image();
da_image.src="favicon.ico";
browser = navigator.appName;
version = parseInt(navigator.appVersion);
function makesound(soundobj){
	var thissound= eval("document."+soundobj)
	thissound.play()
}

function fullScreen(theURL) {
	window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}

var popupWindowPtr	= null;
function launch() {
	popupWindowPtr = window.open( "http://www.cnn.com/QUICKNEWS/ticker/ticker.html", 'popupWindow', 'top=2,left=40,width=620,height=81,scrollbars=no');
	popupWindowPtr.focus();
}
function targetLinks(boNew)
{
   if (boNew) where = "_blank";
   else where = "_self";
   for (var i=0; i<=(document.links.length-1); i++)
   {
   document.links[i].target = where;
   }
}

function newsSearch() 
{
	var qValue = document.searchForm.site.options[document.searchForm.site.selectedIndex].value
	
	if (document.searchForm.query.value == "") {
		alert(" So, you did not enter  \n a search keyword \n and you are -  \n searching nothing ?! \n  \nVery funny indeed !");

document.searchForm.query.focus();
return;

	}
	
	if (qValue != "0")
	
	{
		qValue = qValue + escape(document.searchForm.query.value);
		window.open(qValue,"blank","top=22,left=2,width=620,height=400,menubar=no,status=no,location=no,resizable=yes,scrollbars=yes,");
	} else
	
	{
		alert(" Well, then, \n it might be not so easy  \n to understand, but . . . \n What are you expecting          \n to find this way, \n without selecting a \n news site to search?!") 
document.searchForm.query.focus();
	}
}

function searchSurf(form)
{
	if (form.key.value != "")
	{
		var exciteURL="http://search.excite.com/search.gw?search="+form.key.value+"&c=hourly&act.search.x=24&act.search.y=7";
		
		var yahooURL="http://search.news.yahoo.com/search/news?act.search.x=20&act.search.y=13&p="+form.key.value;
		
		if (form.yahoo.checked)
		location=yahooURL;
		else
		location=exciteURL;
	}
}
var gt = unescape('%3e');
var remote = null;
function remoteStart() {
	remote = window.open('', 'tocRemote', 'width=280,height=115,scrollbars=yes,location=no,resizable=0,top=0,left=300');
	if (remote != null) {
		if (remote.opener == null) {
			remote.opener = self;
		}
		remote.location.href = 'popupm.html';
	}
}
if (document.cookie) {
	var index = document.cookie.indexOf("remoteStart");
	if (index != -1) {
		remoteStart();
	}
}
function dd_check(item,text, check) {
   if(check) {
	   if(item.value == text) {
		   alert(' So, you did not select one of "' + text + '"\n but you want NEWS NOW?! \n Very funny indeed ! \n\n Try again: select a newswire\n from the list of regions/countries available!');
			return false;
		}
	}
	
	return true;
}
function ABCnews()
{
	NewWindow = window.open("abcnews.html","TheWindow","toolbar=no,width=260,height=180,directories=no,status=no,scrollbars=no,resize=no,location=no,menubar=no,top=100,left=300")
}
function CreateWindow()
{
	NewWindow = window.open("moon.html","TheWindow","toolbar=no,width=285,height=350,directories=no,status=no,scrollbars=yes,resize=no,location=no,menubar=no,top=160,left=300")
}
var gt = unescape('%3e');
var remote = null;
function ShowClock() {
	remote = window.open('', 'tocRemote1', 'width=300,height=300,directories=no,status=no,scrollbars=no,resize=no,,toolbar=no,location=no,status=no,menubar=no,location=no,top=0,left=410');
	if (remote != null) {
		if (remote.opener == null) {
			remote.opener = self;
		}
		remote.location.href = 'mcs-clock.html';
	}
}
function missingkids() {
	remote = window.open('', 'tocRemote1', 'width=500,height=200,directories=no,status=no,scrollbars=no,resize=no,,toolbar=no,location=no,status=no,menubar=no,location=no,top=0,left=60');
	if (remote != null) {
		if (remote.opener == null) {
			remote.opener = self;
		}
		remote.location.href = 'missingkids.html';
	}
}
if (document.cookie) {
	var index = document.cookie.indexOf("remoteStart");
	if (index != -1) {
		remoteStart();
	}
}
function RemoteCtrl() {
	remote = window.open('', 'tocRemote1', 'width=230,height=450,directories=no,status=no,scrollbars=no,resize=no,,toolbar=no,location=no,status=no,menubar=no,location=no,top=0,left=60');
	if (remote != null) {
		if (remote.opener == null) {
			remote.opener = self;
		}
		remote.location.href = 'remotectrl.html';
	}
}
if (document.cookie) {
	var index = document.cookie.indexOf("remoteStart");
	if (index != -1) {
		remoteStart();
	}
}
var browserName = navigator.appName;
var browserVersion = parseFloat(navigator.appVersion);
function makeArray()
{
	var args = makeArray.arguments;
	for(var i = 0; i < args.length;i++) {
		this[i] = args[i];
	}
	this.length = args.length;
}

function padZeros(str)
{
	while(str.length < 2)
	str = "0" + str;
	return str;
}

dow = new makeArray("Sunday","Monday","Tuesday",
"Wednesday","Thursday","Friday","Saturday");
mon = new makeArray("January","February","March","April","May",
"June","July","August","September","October","November","December");
function showDateTime()
{
	d = new Date();
	var yr = d.getYear();
	if(yr < 50) {
		yr += 2000;
	}
	else if(yr < 1900) {
		yr += 1900;
	}
	
	ds = dow[d.getDay()] + ", " + mon[d.getMonth()] + " " + d.getDate()
	+ ", " + yr + "";
	
	document.write('<font size="3" face="Arial Narrow,Arial, Helvetica" color="#00ff00">' + ds + '</font>');
}

function newPopUp(url,name)
{
	pressWin =
	window.open(url,name,"scrollbars=no,menubar=no,toolbar=no,status=no,width=360,height=410,resizable=yes,location=no,top=22,left=250")
}

function watchTV(url,name)
{
	pressWin =
	window.open(url,name,'toolbar=0,menubar=0,scrollbars=no,resizable=no,width=485,height=350,top=22,left=140')
}

function ShowWebCam(url,name)
{
	pressWin =
	window.open(url,name,"scrollbars=no,menubar=no,toolbar=no,status=no,width=400,height=420,resizable=yes,location=no,top=12,left=195")
}
function scroll1()
{
	for (j=0;j<=3000;j++)
	window.scroll(0,j);
	for (;j>0;j--)
	window.scroll(0,j);
}

var APlayerSrc = "";

function OpenAudio(url)
{
	APlayerSrc = url;
	if (_version < 12)
	{
		window.open("http://www.usatoday.com/audio/aplay1v2.htm","RAPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=390,height=220,resizable=no");
	}
	else
	{
		window.open("http://www.usatoday.com/audio/aplay1v1.htm","RAPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=390,height=220,resizable=no");
	}
}
var VPlayerSrc = "";
function OpenVideo(url)
{
	VPlayerSrc = url;
	if (_version < 12)
	{
		window.open("http://www.usatoday.com/video/mplay5v2.htm","RMPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=425,height=350,resizable=no");
	}
	else
	{
		window.open("http://www.usatoday.com/video/mplay5v1.htm","RMPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=425,height=350,resizable=no");
	}
}
function OpenVideobig(url)
{
	VPlayerSrc = url;
	if (_version < 12)
	{
		window.open("http://www.usatoday.com/video/mplay6v2.htm","RMPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=425,height=425,resizable=no");
	}
	else
	{
		window.open("http://www.usatoday.com/video/mplay6v1.htm","RMPlayer","scrollbars=no,menubar=no,toolbar=no,status=no,top=0,left=0,screenx=0,screeny=0,width=425,height=425,resizable=no");
	}
}

function MakeArray(n) {
	for (var i = 0; i <= n-1; i++) {
	this[i] = 0 }
	return this
}
path = "";
imageName = new MakeArray(4);
imageName[0] = "";
imageName[1] = "Button_";
imageName[2] = "Circle_";
imageName[3] = "Splash_";
num = new MakeArray(10);
num[0] = new Image(72,72);
num[1] = new Image(72,72);
num[2] = new Image(72,72);
num[3] = new Image(72,72);
num[4] = new Image(72,72);
num[5] = new Image(72,72);
num[6] = new Image(72,72);
num[7] = new Image(72,72);
num[8] = new Image(72,72);
num[9] = new Image(72,72);
function pre(n) {
	num[0].src = path + imageName[n] + "dg0.gif";
	num[1].src = path + imageName[n] + "dg1.gif";
	num[2].src = path + imageName[n] + "dg2.gif";
	num[3].src = path + imageName[n] + "dg3.gif";
	num[4].src = path + imageName[n] + "dg4.gif";
	num[5].src = path + imageName[n] + "dg5.gif";
	num[6].src = path + imageName[n] + "dg6.gif";
	num[7].src = path + imageName[n] + "dg7.gif";
	num[8].src = path + imageName[n] + "dg8.gif";
	num[9].src = path + imageName[n] + "dg9.gif";
	h1 = 0;
	h2 = 0;
	m1 = 0;
	m2 = 0;
	s1 = 0;
	s2 = 0;
	hours1.src = num[0].src
	hours2.src = num[0].src
	min1.src = num[0].src
	min2.src = num[0].src
	sec1.src = num[0].src
	sec2.src = num[0].src
	clock();
}
function seconds(timeValue) {
	var seconds = eval(timeValue.getSeconds());
	return seconds;
}
function minutes(timeValue) {
	var minutes = eval(timeValue.getMinutes());
	return minutes;
}
function hours(timeValue) {
	var hours = eval(timeValue.getHours());
	return hours;
}
function getDigits(timeElement) {
	if (eval(timeElement) <=9) {
		d1 = 0;
		d2 = eval(timeElement);
	}
	else {
		d1 = eval(parseInt(timeElement/10));
		d2 = eval(timeElement - 10*d1);
	}
}
function clock() {
	time = new Date();
	getDigits(hours(time));
	if (d2 != h2) {
		document.hours2.src = num[d2].src;
		h2 = d2;
	}
	if (d1 != h1) {
		document.hours1.src = num[d1].src;
		h1 = d1;
	}
	getDigits(minutes(time));
	if (d2 != m2) {
		document.min2.src = num[d2].src;
		m2 = d2;
	}
	if (d1 != m1) {
		document.min1.src = num[d1].src;
		m1 = d1;
	}
	getDigits(seconds(time));
	if (d2 != s2) {
		document.sec2.src = num[d2].src;
		s2 = d2;
	}
	if (d1 != s1) {
		document.sec1.src = num[d1].src;
		s1 = d1;
	}
	timerID = setTimeout("clock()",200);
}
function newImg() {
	for (i=0; i<=3; i++) {
		if (document.forms[0].numb[i].checked) {
			pre(i);
		}
	}
}
function validEmail(form,field) {
	url = prompt("To subscribe Spy News you should submit your REAL e-mail address; \n not your Yahoo, Hotmail, or such anonymous e-mail address!     -  Mario.","");
	if (url != null && url != "") {
		a = url.lastIndexOf("@");
		b = url.lastIndexOf(".");
		c = url.indexOf(":");
		d = url.indexOf("/");
		e = url.substring(0,a);
		f = e.indexOf("@");
		g = url.substring(a+1,url.length);
		h = g.indexOf("[");
		i = g.indexOf("]");
		j = g.indexOf("<");
		k = g.indexOf(">");
		l = url.substring(a+1,b);
		m = url.substring(b+1,url.length);
		n = url.substring(0,a);
		o = 0;
		if (a > b) {o++};
		if (c != -1) {o++};
		if (d != -1) {o++};
		if (f != -1) {o++};
		if (h != -1) {o++};
		if (i != -1) {o++};
		if (j != -1) {o++};
		if (k != -1) {o++};
		if (l.length < 3) {o++};
		if (m.length < 2) {o++};
		if (n.length < 1) {o++};
		if (o == 0) {
			document[form][field].value=url;
		}
		else {
			alert(" Hey! You have entered \n an invalid email address!\n\n Mario");
		}
	}
	else {
		alert(" Well, then; Next time  \n submit  your REAL e-mail address\n as required.\n\n Mario");
		url="http://mprofaca.cro.net/firstone.html";
	}
}

