window.name = 'main';

function openWindow(windowSize,url){
		
	var win;
	
    if (windowSize=='small')  {
		var win=window.open(url,"smallWindow","width=300,height=250,scrollbars,resizable");
    } else if (windowSize=='crossword')  {
		var win=window.open(url,"crosswordWindow","width=650,height=680,scrollbars,toolbar=yes,menubar=yes,resizable");
    } else if (windowSize=='medium')  {
		var win=window.open(url,"mediumWindow","width=450,height=350,scrollbars,resizable");
    } else if (windowSize=='helpWin')  {
		var win=window.open(url,"helpWindow","width=600,height=400,scrollbars,resizable,toolbar=yes");
    } else if (windowSize=='large')  {
		var win=window.open(url,"largeWindow","width=750,height=500,scrollbars,resizable,toolbar=yes,menubar=yes");
	} else if (windowSize=='sports') {
		var win=window.open(url,"SportsScore","width=600,height=400,scrollbars,resizable");
	} else if (windowSize=='video') {
		var win=window.open(url,"VideoStreaming","status=no,toolbar=no,location=no,directories=no,menu=no,scrollbars=no,resizable=yes,width=212,height=285");
	} else if (windowSize=='chat') {
		var win=window.open(url,"Chat","width=750,height=500,scrollbars,resizable,toolbar=no,menubar=no");
	}	
	windowToTop(win);

}

function openMakeLinkWindow() {
	var pathURL = "/CC/CDA/CC_Navigation/CC_Make_Default_Browser_Page/1,,,00.html?popup=http%3A%2F%2Fwww%2Ecrosswalk%2Ecom%2FCC%2FJS%2FCC%5FOpen%5FWindow%2F0%2C%2C%2CFF%2Ejs&partnerid=";
	var win = window.open(pathURL,"MakeLink","top=50,left=50,width=750,height=500,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no",false);
	windowToTop(win);
}

function clientDateText() {
	var now = new Date();
	var date = now.getDate();
	var datesuffix;
	var monthArr = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	
	if (date==1 || date==21 || date==31) datesuffix="st"
	  else if (date==2 || date==22) datesuffix="nd"
	  else if (date==3 || date==23) datesuffix="rd"
	  else datesuffix="th";
	
	return monthArr[now.getMonth()] + " " + date + datesuffix +"," + " " + now.getFullYear();
}

function clientDateAlt() {
	var now = new Date();
	var date = now.getDate();
	var datesuffix;
	var dayArr = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	var monthArr = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	
	if (date==1 || date==21 || date==31) datesuffix="st"
	  else if (date==2 || date==22) datesuffix="nd"
	  else if (date==3 || date==23) datesuffix="rd"
	  else datesuffix="th";
	
	return dayArr[now.getDay()] + ", " + monthArr[now.getMonth()] + " " + date + datesuffix
}

function windowToTop(win)
{

	win.focus();
}

function windowToTop2(win)
{

	win.focus();
}

