function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}









//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}











// Ticker startup
function startTicker()
{
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
		    theAnchorObject     = document.getElementById("tickerAnchor");
			runTheTicker();   	
		 }
	else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}
// Ticker main run loop
function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,'"');		
		theTargetLink        = theSiteLinks[theCurrentStory];
		theAnchorObject.href = theTargetLink;
		theTargetWindow		 = theLinkTargets[theCurrentStory];
		theAnchorObject.target = theTargetWindow;
		thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "</span>";
	}
	// Stuff the current ticker text into the anchor
	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength) + whatWidget();
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}
// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}











//theCharacterTimeout is the speed of the characters and theStoryTimeout is the pause time

	var theCharacterTimeout = 90;
	var theStoryTimeout     = 5000;
	var theWidgetOne        = "_";
	var theWidgetTwo        = "_";
	var theWidgetNone       = "";
	var theLeadString       = "";

	var theSummaries = new Array();
	var theSiteLinks = new Array();
	var theLinkTargets = new Array();

	var theItemCount = 2;



//theSummaries[0] ="SCEL offices and Claims Centers will be closed Monday, May 31, 2010, for Memorial Day.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1357"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="Invitation for Proposals for a Demographic Study";
//theSiteLinks[0] = "/lottery/invitation.aspx"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="No ticket sales or validations held on Tuesday, June 8, due to election primaries.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1375"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="The State Newspaper incorrectly reported the Midday drawings for Monday, 6/21/2010.";
//theSiteLinks[0] = "/games2/3winningnumbers_pick4.asp"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Centers will be closed Monday, July 5, 2010 for Independence Day.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1386"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="Click here for the Early Bird Millionaire Raffle Drawing Results.";
//theSiteLinks[0] = "/games2/raffle2010/raffle_numbers_early3.asp"
//theLinkTargets[0] = "_blank";

//theSummaries[1] ="SCEL Partners With WMBF-TV and WCSC/Live 5 to Air Nightly Drawings.";
//theSiteLinks[1] = "/games2/drawpartner.aspx"
//theLinkTargets[1] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Centers will be closed Thursday, Nov. 11, 2010, for Veterans Day.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1445"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Centers will be closed Thursday, Nov. 25 and Friday, Nov. 26.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1458"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Centers will be closed December 24, 27 and 28 for the Holidays.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1474"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Centers will be closed Friday, December 31 for New Years.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1474"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="All Lottery offices will be closed Monday, January 17, for Martin Luther King, Jr. Day."
//theSiteLinks[0] = "http://www.sceducationlottery.com/winners/NewsDisplayArticle.asp?ID=1493"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will open at 10 a.m. on Thursday, February 10."
//theSiteLinks[0] = "http://www.sceducationlottery.com"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center are closed today due to inclement weather."
//theSiteLinks[0] = "http://www.sceducationlottery.com"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed Monday, February 21, for Presidents' Day."
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1514"
//theLinkTargets[0] = "_blank";

//theSummaries[2] ="Greenville and Mt. Pleasant Lottery Claims Centers ceased operations Fri., Jan. 14, 2011."
//theSiteLinks[2] = "http://www.sceducationlottery.com/winners/NewsDisplayArticle.asp?ID=1447"
//theLinkTargets[2] = "_blank";

//theSummaries[0] ="SCEL offices and the Claims Center will be closed on Monday, May 30, for Memorial Day.";
//theSiteLinks[0] = "winners/NewsDisplayArticle.asp?ID=1588"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="Join the Lottery at two Upstate events this Saturday!";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1599";
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed Monday, July 4, 2011 for Independence Day.";
//theSiteLinks[0] = "#";
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claim Center will be closed Monday, September 5, 2011, for Labor Day.";
//theSiteLinks[0] = "http://www.sceducationlottery.com/winners/NewsDisplayArticle.asp?ID=1648"
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed Friday, Nov. 11, 2011, for Veterans Day.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1689";
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed Thursday, Nov. 24 and Friday, Nov. 25.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1699";
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed December 23, 26 and 27 for the Holidays.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1713";
//theLinkTargets[0] = "_blank";

//theSummaries[0] ="SCEL offices and Claims Center will be closed Monday, January 2 for New Years.";
//theSiteLinks[0] = "/winners/NewsDisplayArticle.asp?ID=1713"
//theLinkTargets[0] = "_blank";

theSummaries[0] ="Players and Education Win Big: Click Here for the Latest Lottery News!";
theSiteLinks[0] = "/winners/news.asp";
theLinkTargets[0] = "_blank";

theSummaries[1] ="Get a Second Chance to Win: Click Here for Ticket Promotions!";
theSiteLinks[1] = "/promotions/promotions.aspx";
theLinkTargets[1] = "_blank";

/*
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
    // The index() method calculates the index from a
    // given index who is out of the actual item range.
    var idx = carousel.index(i, mycarousel_itemList.length);
    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
    carousel.remove(i);
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
		size: 4,
		scroll: 1,
        wrap: 'last',
        initCallback: mycarousel_initCallback
//        wrap: 'circular', 
//        itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
//        itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}
    });
});
*/



	//Counter
	var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	function countdown(yr,m,d){
		var today=new Date();
		var todayy=today.getYear();
		if (todayy < 1000)
		todayy+=1900;
		var todaym=today.getMonth();
		var todayd=today.getDate();
		var todaystring=montharray[todaym]+" "+todayd+", "+todayy;
		var futurestring=montharray[m-1]+" "+d+", "+yr;
		var difference=(Math.round((Date.parse(futurestring)-Date.parse(todaystring))/(24*60*60*1000))*1);
		if (difference==0)
		document.write("LAST DAY");
		if (difference==1)
		document.write("1 DAY");
		else if (difference>0)
		document.write(difference+" DAYS");
	}
	var mytoday=new Date();
	
	
	
function RaffleCountDown(){
	today=new Date();
	//today=new Date("November 16, 2010");//debug
	/*Friday=new Date("November 12, 2010");
	Saturday=new Date("November 13, 2010");
	Sunday=new Date("November 14, 2010");
	*/
	Monday=new Date("November 15, 2010");
	Tuesday=new Date("November 16, 2010");
	Wednesday=new Date("November 17, 2010");


	/*if (today.getDate()==Friday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Friday.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}

	if (today.getDate()==Saturday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Saturday.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}

	if (today.getDate()==Sunday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Sunday2.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}
	*/
	
	if (today.getDate()==Monday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Monday2.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}

	if (today.getDate()==Tuesday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Tuesday.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}
	
	if (today.getDate()==Wednesday.getDate()){
	document.write("<IMG SRC='http://www.sceducationlottery.com/images/promos/promo2_CarolinaMillionaireRaffle2010_Wednesday.jpg' WIDTH='175' HEIGHT='205' BORDER='0'>");
	}
}
