if (navigator.appName != "Microsoft Internet Explorer") 
{
alert("Sorry this web site is not written to support your web particular browser [" + navigator.appName + "]. All critical user functions may not work correctly and spoil your visit here. Please come back using Microsoft Internet Explorer 6.0 or higher. Click OK to continue.")
}

function StartJS()
{
	Start()
	iClock()
	iNews()
	if(window.location.search != "?>")
	{
		bgs.src = "welcome.wav"
		bgs.src = bgs.src
	}
}


function Go(x)
{
if(x == 0){alert("Open for future home grown application... Click OK now.");return;}

if(x == 20){url="http://gasprices.mapquest.com/?cid=google&sem=1&ncid=MPQMAP00170000000028&s_kwcid=gas%20price%20finder|1699390850"}

if(x == 1){url="http://cj22.com/catalog.htm"}
if(x == 2){url="http://cj22.com/cjlabs.htm"}
if(x == 3){url="http://cj22.com/cspan"}
if(x == 4){url="http://cj22.com/wr.htm"}
if(x == 5){url="http://cj22.com/color.htm"}
if(x == 6){url="http://cj22.com/badger"}
if(x == 7){url="http://cj22.com/comments.htm"}
if(x == 8){url="http://cj22.com/4x"}
if(x == 9){url="http://cj22.com/tv.htm"}
if(x == 10){url="http://cj22.com/007.asp"}
if(x == 11){url="http://text4free.net/#sendtext"}
if(x == 12){url="http://www.addictinggames.com/static/whats_hot.html#"}
if(x == 13){url="http://spoofcard.com/freecall.php#caller"}
if(x == 14){url="http://www.gethomeworkhelp.com"}
if(x == 15){url="astronomy.htm"}
if(x == 16)
	{
ask=confirm("You must have a working web camera and headset hooked up first. You can conference with up to 8 people here. If you are ready click [OK] or [Cancel] now...")
if(!ask){return} 
	else 	{
	url1=prompt("For private room enter unique new name. Click [OK] for public room or [Cancel] to abort.","cj22webcamroom")
	if(!url1){url1=""; return;}
	url="http://www.mebeam.com/" + url1
		}
	}

if(x == 17){
	url=""
	choice = prompt("[MENU] 1-SykpeOut 2-VoiceMail 3-Chat 4-SendSMS 5-Directory 6-CountryCode 7-Schedule Skype - Choose 1,2,3.4,5,6,7","1")
	if(!choice){return}
	if(choice == 1){
		ask = prompt("Enter +, country code, area code, and telephone number (i.e. 12035551212)","1203")
		if(!ask){return}
		window.location.replace("skype:+" + ask + "?call")
		}
	if(choice == 2){
		ask = prompt("Enter Skype username or their number to leave them a voicemail.","+1203")
		if(!ask){return}
		window.location.replace("skype:" + ask + "?voicemail")
		}
	if(choice == 3){
		ask = prompt("Enter Skype user`s screename to start a chat session with them.","cj22.com")
		if(!ask){return}
		window.location.replace("skype:" + ask + "?chat")
		}
	if(choice == 4){
		ask = prompt("Enter +, country code, area code, and cell phone number to text message (i.e. 12035551212)","1203")
		if(!ask){return}
		window.location.replace("skype:+" + ask + "?sms")
		}
	if(choice == 5){
		ask = confirm("This will open a www.whitepages.com web site for you to look up a telephone number. Just do a `copy and paste` of the number back here later. Click [OK] to continue or [Cancel] to abort.")
		if(!ask){return}
		wp=window.open("http://www.whitepages.com",
		"oWin2",
		"top=10,left=10,width=600,height=550,location=0,resizable=1,scrollbars=1,status=0,menubar=0,toolbar=0")
		url = prompt("OK what is the number? You can paste with [Ctrl][V] on your keyboard.","1203")
		if(!url){return}
		window.location.replace("skype:+" + url + "?call")
		}
	if(choice == 6){
		ask = confirm("This will open a www.countrycodes.com web site for you to look up a Country Codes. Click [OK] to continue or [Cancel] to abort.")
		if(!ask){return}
		wp=window.open("http://www.countrycodes.com",
		"oWin2",
		"top=10,left=10,width=600,height=550,location=0,resizable=1,scrollbars=1,status=0,menubar=0,toolbar=0")
		url = prompt("OK what is the country code and telephone number. You can paste with [Ctrl][V] on your keyboard.","1")
		if(!url){return}
		window.location.replace("skype:+" + url + "?call")
		}
	if(choice == 7){
		now1 = new Date()
		now = now1.toLocaleString()
		oSkypeTime = prompt("To schedule a future SkypeOut call change the timestamp below and click [OK].",now)
		if(!oSkypeTime){return}
		oSkypeCall = prompt("What telephone # or Skype user to call at " + oSkypeTime + "?","12035551212")
		if(!oSkypeCall){return}
		alert("You must leave this website up and running without any reloads or refreshes for this to work properly. When " + oSkypeTime + " arrives we will prompt you to make the SkypeOut call. Click [OK] to continue...")
		SchedSkype()
		}
	return
	}

window.open(url,"oWin1","top=10,left=10,width=850,height=550,location=1,resizable=1,scrollbars=1,status=1,menubar=0,toolbar=0")
}

var oSkypeTime 
var oSkypeCall 

function SchedSkype()
{
	now1 = new Date()
	now = now1.toLocaleString()
	if(now == oSkypeTime)
	{
		bgs.src = "skype.wav"
		bgs.src = bgs.src
		setTimeout("SchedSkype2()",5000)
	} 
	setTimeout("SchedSkype()",1000)
}

function SchedSkype2()
{
	alert("Your Skype Call alarm scheduled at " + oSkypeTime + " is ready. Click [OK]...")
	ask=confirm("Are you ready for your Skype Call to " + oSkypeCall + "? Click [OK} to call or [Cancel] to abort.")
	if(!ask){clearTimeout();return;}
	window.location.replace("skype:+" + oSkypeCall + "?call")
	clearTimeout()
	return
}

function Dial()
{
	window.location.replace("skype:+1" + skypewindow.value + "?call")
}

function iNews()
{
	document.all.NewsFrame.src="black.htm"
	//document.all.CalendarFrame.src="black.htm"
	//setTimeout("document.all.CalendarFrame.src='calendardark.htm'",50)
	setTimeout("document.all.NewsFrame.src='topstories2.asp'",2500)
	//setTimeout("document.all.NewsFrame.src='worldnews2.asp'",60000 * 2.5)
	setTimeout("iNews()",60000 * 5)
}

function iClock()
{
	now1 = new Date()
	now = now1.toLocaleString()	
	oChrono.innerText = now
	setTimeout("iClock()",1000)
}

function News(url)
{
window.open(url,"_blank",
"top=1,left=1,width=600,height=400,resizable=1,scrollbars=1,location=1");
}

function ReloadSite()
{
ask=confirm("Are you sure you want to reload this web site? If jazz music is running it will be reset. Click [OK] or [Cancel].")
if(!ask){return} else {window.location.replace(window.location.href)}
}

function Capture()
{
	x = event.keyCode
	y = oCatch.value + x + "-"
	oCatch.value = y
	w = oCatch.value
	if(w.length > 25 || x == 27){oCatch.value=""}
	if(w.indexOf("220-17-70-16")>-1){alert("Access Approved!");oCatch.value="";Go(10);}
}


function PlayTi()
{
oJazz.innerHTML=""
logo.src="ti.gif"
oJazz.innerHTML="<object id=objTitanium classid=clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=50 width=100><param name=SRC value='ti.rm'><param name=autostart value=true></object>"
oJazz.title="Titanium Description..."
setTimeout("RestoreJazz()",60000)
}

function RestoreJazz()
{
oJazz.innerHTML="<font color=#FFFFFF><input type=button value=Jazz title='Play smooth jazz in the background during your visit here...' onclick=Jazz() style='background-color: rgb(0,0,0); color: rgb(255,255,255); font-family: Verdana; border: none;'></font>"
logo.src="cj22-logo.gif"
}

function Music()
{
oJazz.innerHTML=""
oJazz.innerHTML="<object id=objMovie0 classid=clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=85 width=280><param name=SRC value=http://www.sky.fm/mp3/smoothjazz.pls><param name=autostart value=true></object><br><font face=Verdana size=1 color=white><a href='javascript:Music()'>Click here if jazz your listening to prematurely stops</a></font>"
//100
oJazz.title="Smooth jazz courtesy of CJ22.com..."
}

function Jazz()
{
ask1=confirm("Like to listen to really cool smooth jazz in background during visit? Click [OK] or [Cancel].")
if(ask1)
	{ 
		ask2=confirm("To play jazz in background you will need the RealPlayer free software loaded from http://www.realnetworks.com. If you have it already click [OK] now. If not click [Cancel] to download it for free. Then return here with your web browser`s [BACK] button.")
		if(ask2)
		{
			Music()
		}
		else
			{
				window.location.replace("http://www.realnetworks.com/info/freeplayer")
			}
	}
}

function MCap()
{
x=event.button
	if(x == 2)
	{
   alert("Restricted Function. Click OK now...")
   return
	}
}