// Global JavaScript Document
function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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 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_showHideBlockLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideBlockLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v='hide')?'none':v; }
    obj.display=v; }
}


function writeCopyright(){
	// get the current year and write it
	var theDate = new Date();
	//document.write();
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy;" + theDate.getFullYear() + " CWI. All Rights Reserved. <span class='creditLine'>site by <a href='http://www.cocoassociates.com' rel='nofollow'>CoCo & Associates</a> and <a href='http://www.1000kbps.com' rel='nofollow'>1000kbps.com</a</span>");
}
function writeDay(){
	// get the current day
	var theDate = new Date();
	var monthDay = theDate.getDate();
	var weekDay = theDate.getDay();
	var theMonth = theDate.getMonth();
	var theMonthName="";
	var theDayName="";
	switch(weekDay){case 0: theDayName = "Sunday";break;case 1: theDayName = "Monday";break;case 2: theDayName = "Tuesday";break;case 3: theDayName = "Wednesday";break;case 4: theDayName = "Thursday";break;case 5: theDayName = "Friday";break;case 6: theDayName = "Saturday";break;}
	switch(theMonth){case 0: theMonthName="January";break;case 1: theMonthName="February";break;case 2: theMonthName="March";break;case 3: theMonthName="April";break;case 4: theMonthName="May";break;case 5: theMonthName="June";break;case 6: theMonthName="July";break;case 7: theMonthName="August";break;case 8: theMonthName="September";break;	case 9: theMonthName="October";break;case 10: theMonthName="November";break;case 11: theMonthName="December";break;}
	document.write(theDayName + ", " + theMonthName + " " + monthDay);
}

function writeEmail(thename,addr,theformat){
		var aa, bb, cc, dd, ee, ff
		aa=addr;
		bb="@";
		cc="cwiconnections.";
		dd="com";
		ee=(aa + bb + cc + dd);
		ff=thename;
		if(theformat=="thename"){
			document.write("<a href=\"mailto:" + ee + "\">" + thename + "</a>");
		}else{
			document.write("<a href=\"mailto:" + ee + "\">" + ee + "</a>");
		}
}