monthName = new Array(12);
monthName[1] = "January";
monthName[2] = "February";
monthName[3] = "March";
monthName[4] = "April";
monthName[5] = "May";
monthName[6] = "June";
monthName[7] = "July";
monthName[8] = "August";
monthName[9] = "September";
monthName[10] = "October";
monthName[11] = "November";
monthName[12] = "December";

function LaunchBrandedWindow(address) {
	linkwindow = window.open('links.asp?link=' + address,null,"height=600,width=800,scrollbars=yes,resizable=yes,menubar=no");
	window.linkwindow.focus();
}

function LaunchPopupAd() {
	window.open("ad.htm","Ad","height=340,width=320,scrollbars=no,resizable=no");
}

function LaunchDiscussionBoard() {
	window.open("http://www.conyersonline.com/discussion/index.php","DiscussionBoard","top=0,left=0,height=600,width=800,toolbar=no,menubar=yes,scrollbars=yes,resizable=yes");
}

function LaunchCalendar() {
	window.open("http://www.conyersonline.com/calendar/calendar.asp?caltype=week","Calendar","top=0,left=0,height=600,width=800,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
}

function formatDate(theDate) {
	var theMonth = monthName[theDate.getMonth() + 1];
	return theMonth
}

function LaunchNewsReport() {
	window.open("http://www.rockdalecitizen.com",null,"top=0,left=0,height=550,width=800,scrollbars=yes,resizable=yes");
}

function LaunchTVReport() {
	window.open("http://tvlistings4.zap2it.com/tvkit/grid.asp?partner_id=L9X",null,"top=0,left=0,height=480,width=740,scrollbars=yes,resizable=yes");
}

function LaunchMovieReport() {
	window.open("http://www.carmike.com/showtimes/dsp_showtimesdetail.aspx?theatrenumber=070407",null,"top=0,left=0,height=480,width=800,scrollbars=yes,resizable=yes");
}

function LaunchGuide() {
	window.open ("businessdirectory/browse.asp",null,"resizable=yes height=600,width=800,top=0,left=0,status=yes,toolbar=no,menubar=no,location=no");
}

function GetEvents(d) {
	window.open('events.asp?date=' + d,null,'resizable=no,scrollbars=yes,height=480,width=500,top=0,left=0,status=no,toolbar=no,menubar=yes,location=no');
}

function LaunchBackOfficeLoginWindow() {
	window.open("currentpage.asp?wci=MemberLogin","Login","height=360,width=320,scrollbars=no");
}

function GoToCreateNewMember(w1,w2,location) {
	w1.location = location
	w2.close();
	return true
}

function OpenEditorWindow(QueryStr) {
	window.open("backoffice.asp" + QueryStr,"WebEditor","height=535,width=780,top=0,left=0,status=yes,scrollbars=no");
}

function CreateWebEditor(Name,Width,Height,Parameters) {
	eWebEditPro.parameters.config = Parameters[0]
	eWebEditPro.parameters.hideAboutButton = Parameters[1];
	eWebEditPro.create(Name, Width, Height);
	return true;		
}

function QueryString(key){
	var value = null;
	for (var i=0;i<QueryString.keys.length;i++)
	{
		if (QueryString.keys[i]==key)
		{
			value = QueryString.values[i];
			break;
		}
	}
	return value;
}

function QueryString_Parse(){
	var query = window.location.search.substring(1);
	var pairs = query.split("&");
	
	for (var i=0;i<pairs.length;i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos >= 0)
		{
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			QueryString.keys[QueryString.keys.length] = argname;
			QueryString.values[QueryString.values.length] = value;		
		}
	}

}

var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs)
Onecurrent = 0;
var OneLinks = new Array(5);
OneLinks[0] = "";
OneLinks[1] = "";
OneLinks[2] = "";
OneLinks[3] = "";
OneLinks[4] = "";
function Onenext() {
if (document.Oneslideform.Oneslide[Onecurrent+1]) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value;
document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent;
   }
else Onefirst();
}
function Oneprevious() {
if (Onecurrent-1 >= 0) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value;
document.Oneslideform.Oneslide.selectedIndex = --Onecurrent;
   }
else Onelast();
}
function Onefirst() {
Onecurrent = 0;
document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value;
document.Oneslideform.Oneslide.selectedIndex = 0;
}
function Onelast() {
Onecurrent = document.Oneslideform.Oneslide.length-1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
}
function Oneap(text) {
document.Oneslideform.Oneslidebutton.value = (text == "Stop") ? "Start" : "Stop";
Onerotate();
}
function Onechange() {
Onecurrent = document.Oneslideform.Oneslide.selectedIndex;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
}
function Onerotate() {
if (document.Oneslideform.Oneslidebutton.value == "Stop") {
Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
window.setTimeout("Onerotate()", Onerotate_delay);
}
}
function Onetransport(){
window.location=OneLinks[Onecurrent]
}

QueryString.keys = new Array();
QueryString.values = new Array();
QueryString_Parse();