
//this variable used for header sorting
var headersort=0;
var previousHeaderColumn=1;
var prevColumn=1;
var prevColumnValue="/Content/EventsLandingZip/default/Assets/Images/arrow-down.gif";

//var totalItems=89;
//used to show the corresponding news - show()
//var currentTextValue=null;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function checkdate(objName) {

	var datefield = objName;

	if (chkdate(objName) == false)
		return false;
	else
		return true;
}

function chkdate(objName) {

	var strDatestyle = "US";	// USA date style
//	var strDatestyle = "EU";	// European date style

	var strDate;
	var strDateArray;
	var strDay;
	var strMonth;
	var strYear;
	var intday;
	var intMonth;
	var intYear;
	var booFound = false;
	var datefield = objName;
	var strSeparatorArray = new Array("-"," ","/",".");
	var intElementNr;
	var err = 0;
	var strMonthArray = new Array(12);

	strMonthArray[0] = "Jan";
	strMonthArray[1] = "Feb";
	strMonthArray[2] = "Mar";
	strMonthArray[3] = "Apr";
	strMonthArray[4] = "May";
	strMonthArray[5] = "Jun";
	strMonthArray[6] = "Jul";
	strMonthArray[7] = "Aug";
	strMonthArray[8] = "Sep";
	strMonthArray[9] = "Oct";
	strMonthArray[10] = "Nov";
	strMonthArray[11] = "Dec";

	strDate = datefield;

	if (strDate.length < 1) return true;

	for (intElementNr = 0; intElementNr < strSeparatorArray.length; intElementNr++) {

		if (strDate.indexOf(strSeparatorArray[intElementNr]) != -1) {

			strDateArray = strDate.split(strSeparatorArray[intElementNr]);

			if (strDateArray.length != 3) {
				err = 1;
				return false;
			} else {
				strDay   = strDateArray[0];
				strMonth = strDateArray[1];
				strYear  = strDateArray[2];
			}

			booFound = true;
		}
	}

	if (booFound == false) {

		if (strDate.length > 5) {

			strDay   = strDate.substr(0, 2);
			strMonth = strDate.substr(2, 2);
			strYear  = strDate.substr(4);
		}
	}

	if(strYear != null){

		if (strYear.length == 2) {
			strYear = '20' + strYear;
		}
	}

	// US style
	if (strDatestyle == "US") {
		strTemp = strDay;
		strDay = strMonth;
		strMonth = strTemp;
	}

	intday = parseInt(strDay, 10);

	if (isNaN(intday)) {
		err = 2;
		return false;
	}

	intMonth = parseInt(strMonth, 10);

	if (isNaN(intMonth)) {

		for (i = 0;i<12;i++) {

			if (strMonth.toUpperCase() == strMonthArray[i].toUpperCase()) {

				intMonth = i+1;
				strMonth = strMonthArray[i];
				i = 12;
			}
		}

		if (isNaN(intMonth)) {
			err = 3;
			return false;
		}
	}

	intYear = parseInt(strYear, 10);

	if (isNaN(intYear)) {
		err = 4;
		return false;
	}

	if (intMonth>12 || intMonth<1) {
		err = 5;
		return false;
	}

	if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12) && (intday > 31 || intday < 1)) {
		err = 6;
		return false;
	}

	if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intday > 30 || intday < 1)) {
		err = 7;
		return false;
	}

	if (intMonth == 2) {

		if (intday < 1) {
			err = 8;
			return false;
		}


		if (LeapYear(intYear) == true) {

			if (intday > 29) {
				err = 9;
				return false;
			}
		} else {

			if (intday > 28) {
				err = 10;
				return false;
			}
		}
	}

	if (strDatestyle == "US") {
		//datefield.value = strMonthArray[intMonth-1] + " " + intday+" " + strYear;
	}
	else {
		//datefield.value = intday + " " + strMonthArray[intMonth-1] + " " + strYear;
	}

	return true;
}

function LeapYear(intYear) {

	if (intYear % 100 == 0) {
		if (intYear % 400 == 0) { return true; }
	}
	else {
		if ((intYear % 4) == 0) { return true; }
	}

	return false;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Date Comparison Logic

function CompareDate(d1,d2) {

	dt1=getDateObject(d1,"/");
	dt2=getDateObject(d2,"/");

	if (dt1 == dt2) return 0;

	if (dt1 > dt2) return 1

	return -1;
}

function getDateObject(dateString,dateSeperator)
{
	//This function return a date object after accepting
	//a date string ans dateseparator as arguments
	var curValue=dateString;
	var sepChar=dateSeperator;
	var curPos=0;
	var cDate,cMonth,cYear;

	//extract month portion
	endPos=dateString.indexOf(sepChar,curPos+1);
	cMonth=dateString.substring(curPos+1,endPos);

	//extract day portion
	curPos=dateString.indexOf(sepChar);
	cDate=dateString.substring(0,curPos);

	//extract year portion
	curPos=endPos;
	endPos=curPos+5;
	cYear=curValue.substring(curPos+1,endPos);

	//Create Date Object
	if(cYear > 0 && cMonth > 0 && cDate > 0)
	{
		dtObject=new Date(cYear,cMonth,cDate);
		return dtObject;
	}

	return null;
}

// Date logic Ends

function sortTable(id, col, rev,headerid) {

  // Get the table or table section to sort.
  //alert (headerid);
  var tblEl = document.getElementById(id);
  var test=document.getElementById(headerid);
  //alert(test);
  //alert(test.src);
  
  // The first time this function is called for a given table, set up an
  // array of reverse sort flags.
  if (tblEl.reverseSort == null) {
    tblEl.reverseSort = new Array();
    // Also, assume the team name column is initially sorted.
    tblEl.lastColumn = 1;
  }

  // If this column has not been sorted before, set the initial sort direction.
  if (tblEl.reverseSort[col] == null)
    tblEl.reverseSort[col] = rev;

  // If this column was the last one sorted, reverse its sort direction.
  if (col == tblEl.lastColumn)
    tblEl.reverseSort[col] = !tblEl.reverseSort[col];

  // Remember this column as the last one sorted.
  tblEl.lastColumn = col;

  // Set the table display style to "none" - necessary for Netscape 6
  // browsers.
  var oldDsply = tblEl.style.display;
  tblEl.style.display = "none";

  // Sort the rows based on the content of the specified column using a
  // selection sort.

  var tmpEl;
  var i, j;
  var minVal, minIdx;
  var testVal;
  var cmp;

  for (i = 0; i < tblEl.rows.length - 1; i++) {

    // Assume the current row has the minimum value.
    minIdx = i;
    minVal = getTextValue(tblEl.rows[i].cells[col]);

    // Search the rows that follow the current one for a smaller value.
    for (j = i + 1; j < tblEl.rows.length; j++) {
      testVal = getTextValue(tblEl.rows[j].cells[col]);
      cmp = compareValues(minVal, testVal);
      // Negate the comparison result if the reverse sort flag is set.
      if (tblEl.reverseSort[col])
        cmp = -cmp;
      // Sort by the second column (team name) if those values are equal.
      if (cmp == 0 && col != 1)
        cmp = compareValues(getTextValue(tblEl.rows[minIdx].cells[1]),
                            getTextValue(tblEl.rows[j].cells[1]));
      // If this row has a smaller value than the current minimum, remember its
      // position and update the current minimum value.
      if (cmp > 0) {
        minIdx = j;
        minVal = testVal;
      }
    }

    // By now, we have the row with the smallest value. Remove it from the
    // table and insert it before the current row.
    if (minIdx > i) {
      tmpEl = tblEl.removeChild(tblEl.rows[minIdx]);
      tblEl.insertBefore(tmpEl, tblEl.rows[i]);
    }
  }

  makePretty(tblEl, col,rev,headerid);			// Make it look pretty.

  setRanks(tblEl, col, rev);		// Set team rankings.

  tblEl.style.display = oldDsply;	// Restore the table's display style.

  return false;
}

//-----------------------------------------------------------------------------
// Functions to get and compare values during a sort.
//-----------------------------------------------------------------------------

// This code is necessary for browsers that don't reflect the DOM constants
// (like IE).
if (document.ELEMENT_NODE == null) {
  document.ELEMENT_NODE = 1;
  document.TEXT_NODE = 3;
}

function getTextValue(el) {

	var i;
	var s;

	s = "";

	// Find and concatenate the values of all text nodes contained within the element.

	for (i = 0; i < el.childNodes.length; i++) {

		if (el.childNodes[i].nodeType == document.TEXT_NODE)
			s += el.childNodes[i].nodeValue;
		else if (el.childNodes[i].nodeType == document.ELEMENT_NODE && el.childNodes[i].tagName == "BR")
			s += " ";
		else
			// Use recursion to get text within sub-elements.
			s += getTextValue(el.childNodes[i]);
	}

	return normalizeString(s);
}

function compareValues(v1, v2) {

	var f1, f2;

	if(checkdate(v1) && checkdate(v2)) {

		var d1=Date.parse(v1);
		var d2=Date.parse(v2);

		if(d1!=null && d2!=null) {

			if (d1 == d2) return 0;
			if (d1 > d2)  return 1;

			return -1;
		}
	}

	f1 = parseFloat(v1);
	f2 = parseFloat(v2);

	if (!isNaN(f1) && !isNaN(f2)) {
		v1 = f1;
		v2 = f2;
	}

	// Compare the two values.
	if (v1 == v2) return 0;
	if (v1 > v2)  return 1

	return -1;
}

// Regular expressions for normalizing white space.
var whtSpEnds = new RegExp("^\\s*|\\s*$", "g");
var whtSpMult = new RegExp("\\s\\s+", "g");

function normalizeString(s) {

	s = s.replace(whtSpMult, " ");  // Collapse any multiple whites space.
	s = s.replace(whtSpEnds, "");   // Remove leading or trailing white space.

	return s;
}

// Style class names.
var rowClsNm = "odd";
var colClsNm = "even";

// Regular expressions for setting class names.
var rowTest = new RegExp(rowClsNm, "gi");
var colTest = new RegExp(colClsNm, "gi");

function makePretty(tblEl, col,rev,headerid) {

  var i, j;
  var rowEl, cellEl;

  // Set style classes on each row to alternate their appearance.
  for (i = 0; i < tblEl.rows.length; i++) {
   rowEl = tblEl.rows[i];
   rowEl.className = rowEl.className.replace(rowTest, "");
    if (i % 2 != 0)
      rowEl.className += " " + rowClsNm;
    rowEl.className = normalizeString(rowEl.className);
    // Set style classes on each column (other than the name column) to
    // highlight the one that was sorted.
    for (j = 1; j < tblEl.rows[i].cells.length; j++) {
      cellEl = rowEl.cells[j];
      cellEl.className = cellEl.className.replace(colTest, "");
      if (j == col)
        cellEl.className += " " + colClsNm;
      cellEl.className = normalizeString(cellEl.className);
    }
  }

  // Find the table header and highlight the column that was sorted.
  var el = tblEl.parentNode.tHead;
  rowEl = el.rows[el.rows.length - 1];
  // Set style classes for each column as above.
   for (i = 1; i < rowEl.cells.length; i++) {
	   //alert(document.getElementById('header'+i).src='default/Assets/Images/arrow-none.gif');
	   if(i!=col)
	   document.getElementById('header'+i).src='/Content/EventsLandingZip/default/Assets/Images/arrow-none.gif';
	   
   }
  for (i = 1; i < rowEl.cells.length; i++) {
    cellEl = rowEl.cells[i];
    cellEl.className = cellEl.className.replace(colTest, "");
    // Highlight the header of the sorted column.
	
    if (i == col){
      	cellEl.className += " " + colClsNm;
	    		//cellEl.innerHTML="<img src='/assets/img/up.gif' border='0' alt='sort'>";
	    		//cellEl.style.backgroundColor="green";
	    		//alert("i ="+i+" Col = "+col)
	    		showHeader(col,rev,document.getElementById(headerid));
      }
	 
      cellEl.className = normalizeString(cellEl.className);
  }
}


function showHeader(col,rev ,headerid){

	//var colID=headerid;
	//alert("headerid : "+colID);
	//var tmp = document.getElementById(colID);
	//headerColumn = col;
		//alert("headerid value: "+tmp.value);
		var test=headerid;
		//alert(headerid.src);
	//alert("called");
	//alert(headerid.Src);
	//alert(headerid);
	if(headerid.src !=null){

		if(headerid.src.indexOf('/Content/EventsLandingZip/default/Assets/Images/arrow-down.gif') != -1){

//alert('yes');
			headerid.src ='/Content/EventsLandingZip/default/Assets/Images/arrow-up.gif';
			//alert(headerid.src);
		}
		else{
			//alert('no');
			headerid.src ='/Content/EventsLandingZip/default/Assets/Images/arrow-down.gif';
			//alert('after no');
			//alert(headerid.src);
		}
	}

	//headerValue+col = currentValue;


/*	if(typeof tmp!='undefined')
	{
		alert("Tmp Value : "+tmp.value);
		if(tmp.indexOf("up.gif")!= -1){
			tmp.innerHTML="<img src='/assets/img/down.gif' border='0' alt='sort'>";
		}
		else{
			tmp.innerHTML="<img src='/assets/img/up.gif' border='0' alt='sort'>";
		}

	}
*/

/*
	if(previousHeaderColumn == col)
	{
		//hideAllHeader();
		tmp.innerHTML="<img src='/assets/img/up.gif' border='0' alt='sort'>";
		previousHeaderColumn = 0;
		headersort = 0;
	}else {
		//hideAllHeader();
		tmp.innerHTML="<img src='/assets/img/down.gif' border='0' alt='sort'>";
		headersort = 1;
		previousHeaderColumn = col;
	}
	
	

	if( col > 1 && headersort == 0){
		tmp.innerHTML="<img src='/assets/img/up.gif' border='0' alt='sort'>";
	}
	if( col > 1 && headersort == 1){
		tmp.innerHTML="<img src='/assets/img/down.gif' border='0' alt='sort'>";
	}
*/
}

function setRanks(tblEl, col, rev) {

  // Determine whether to start at the top row of the table and go down or
  // at the bottom row and work up. This is based on the current sort
  // direction of the column and its reversed flag.

  var i    = 0;
  var incr = 1;

  if (tblEl.reverseSort[col])
    rev = !rev;
  if (rev) {
    incr = -1;
    i = tblEl.rows.length - 1;
  }

  // Now go through each row in that direction and assign it a rank by
  // counting 1, 2, 3...

  var count   = 1;
  var rank    = count;
  var curVal;
  var lastVal = null;

  // Note that this loop is skipped if the table was sorted on the name
  // column.
  while (col > 1 && i >= 0 && i < tblEl.rows.length) {

    // Get the value of the sort column in this row.
    curVal = getTextValue(tblEl.rows[i].cells[col]);

    // On rows after the first, compare the sort value of this row to the
    // previous one. If they differ, update the rank to match the current row
    // count. (If they are the same, this row will get the same rank as the
    // previous one.)
    if (lastVal != null && compareValues(curVal, lastVal) != 0)
        rank = count;
    // Set the rank for this row.
    tblEl.rows[i].rank = rank;

    // Save the sort value of the current row for the next time around and bump
    // the row counter and index.
    lastVal = curVal;
    count++;
    i += incr;
  }

  // Now go through each row (from top to bottom) and display its rank. Note
  // that when two or more rows are tied, the rank is shown on the first of
  // those rows only.

  var rowEl, cellEl;
  var lastRank = 0;

  // Go through the rows from top to bottom.
  for (i = 0; i < tblEl.rows.length; i++) {
    rowEl = tblEl.rows[i];
    cellEl = rowEl.cells[0];
    // Delete anything currently in the rank column.
    while (cellEl.lastChild != null)
      cellEl.removeChild(cellEl.lastChild);
    // If this rows rank is different from the previous one, Insert a new text
    if (col > 1 && rowEl.rank != lastRank) {
      cellEl.appendChild(document.createTextNode(rowEl.rank));
      lastRank = rowEl.rank;
    }
  }
}



// JavaScript Document to change status icons
	function dispAllImg()
		{	
			dispPic('EascMaddaenFinSdate','EascMaddaenFinEdate','imEascMaddaenFin','trophy');
			dispPic('MusicFestivalSdate','MusicFestivalEdate','imMusicFestival','doller');
			dispPic('GOW711newSdate','GOW711newEdate','imGOW711new','ticket');
			dispPic('LocorocoPromotionsSdate','LocorocoPromotionsEdate','imLocorocoPromotions','doller');
			dispPic('DewTourRewind2009Sdate','DewTourRewind2009Edate','imDewTourRewind2009','ticket');
			dispPic('NcaaRoseBowlRecapSdate','NcaaRoseBowlRecapEdate','imNcaaRoseBowlRecap','trophy');
			dispPic('GT5Sdate','GT5Edate','imGT5','doller');
			dispPic('SingStarSdate','SingStarEdate','imSingStar','doller');
			dispPic('sharkSdate','sharkEdate','imshark','doller');
			dispPic('rcfSdate','rcfEdate','imrcf','doller');
			dispPic('alwaySdate','alwayEdate','imalway','ticket');
			dispPic('UnchartedSdate','UnchartedEdate','imUncharted','doller');
			dispPic('voodooexpSdate','voodooexpEdate','imvoodooexp','ticket');
			dispPic('fifatourSdate','fifatourEdate','imfifatour','trophy');
			dispPic('orlandSdate','orlandEdate','imorland','ticket');
			dispPic('ncaaSdate','ncaaEdate','imncaa','ticket');
			dispPic('BurnSdate','BurnEdate','imBurn','doller');
			dispPic('CinemaSdate','CinemaEdate','imCinema','ticket');
			dispPic('DewtSdate','DewtEdate','imDewt','ticket');
			dispPic('BuzzedSdate','BuzzedEdate','imBuzzed','doller');
			dispPic('TailSdate','TailEdate','imTail','ticket');
			dispPic('PainSdate','PainEdate','imPain','doller');
			dispPic('PapaSdate','PapaEdate','imPapa','ticket');
			dispPic('WendySdate','WendyEdate','imWendy','doller');
			dispPic('VirginSdate','VirginEdate','imVirgin','ticket');
			dispPic('DewtourportlandSdate','DewtourportlandEdate','imDewtourportland','ticket');
			dispPic('LollapanewSdate','LollapanewEdate','imLollapanew','ticket');
			dispPic('CatchcrissSdate','CatchcrissEdate','imCatchcriss','ticket');
			dispPic('MLBtheshowSdate','MLBtheshowEdate','imMLBtheshow','trophy');
			dispPic('APWSdate','APWEdate','imAPW','ticket');
			dispPic('BostonSdate','BostonEdate','imBoston','ticket');
			dispPic('ComicConSdate','ComicConEdate','imComicCon','ticket');
			dispPic('MileHighSdate','MileHighEdate','imMileHigh','ticket');
			dispPic('AllStarSdate','AllStarEdate','imAllStar','ticket');
			dispPic('bzbSdate','bzbEdate','imbzb','doller');
			dispPic('CMASdate','CMAEdate','imCMA','doller');
			dispPic('InFamous7Sdate','InFamous7Edate','imInFamous7','ticket');
			dispPic('ShorelineSdate','ShorelineEdate','imShoreline','doller');
			dispPic('PatroltruckSdate','PatroltruckEdate','imPatroltruck','ticket');
			dispPic('RockunpluggedSdate','RockunpluggedEdate','imRockunplugged','doller');
			dispPic('RockontherangeSdate','RockontherangeEdate','imRockontherange','doller');
			dispPic('RockbandSdate','RockbandEdate','imRockband','doller');
			dispPic('RoadtoretributionSdate','RoadtoretributionEdate','imRoadtoretribution','trophy');
			dispPic('Killzone2championshipsSdate','Killzone2championshipsEdate','imKillzone2championships','trophy');
			dispPic('Patapon2promoSdate','Patapon2promoEdate','imPatapon2promo','trophy');
			dispPic('StagecoachfestivalSdate','StagecoachfestivalEdate','imStagecoachfestival','ticket');
			dispPic('PromomentSdate','PromomentEdate','imPromoment','doller');
			dispPic('LeprechaunSdate','LeprechaunEdate','imLeprechaun','ticket');
			dispPic('FifaSdate','FifaEdate','imFifa','trophy');
			dispPic('PscardSdate','PscardEdate','imPscard','ticket');
			dispPic('KillzoneSdate','KillzoneEdate','imKillzone','ticket');
			dispPic('BuzzSdate','BuzzEdate','imBuzz','doller');
			dispPic('WinterxSdate','WinterxEdate','imWinterx','ticket');
			dispPic('RkSdate','RkEdate','imRk','trophy');
			dispPic('WinterdewSdate','WinterdewEdate','imWinterdew','ticket');
			dispPic('RedbullSdate','RedbullEdate','imRedbull','ticket');
			dispPic('NpplSdate','NpplEdate','imNppl','ticket');
			dispPic('TakeTheStageSdate','TakeTheStageEdate','imTakeTheStage','doller');
			dispPic('SemaSdate','SemaEdate','imSema','ticket');
			dispPic('LbpSdate','LbpEdate','imLbp','ticket');
			dispPic('AllPointWestSdate','AllPointWestEdate','imAllPointWest','ticket');
			dispPic('LollaSdate','LollaEdate','imLolla','ticket');
			dispPic('ASTDewTourSdate','ASTDewTourEdate','imASTDewTour','ticket');
			dispPic('TheBamboozleSdate','TheBamboozleEdate','imTheBamboozle','ticket');
			dispPic('CoachellaSdate','CoachellaEdate','imCoachella','ticket');
		}
	function dispPic(lbl1, lbl2, picid, folderName)
	{
		var msDate, sDate, eDate, getArr;
		sDate=document.getElementById(lbl1).innerHTML;
		msDate=document.getElementById(lbl1).innerHTML;
		eDate=document.getElementById(lbl2).innerHTML;
		getArr=sDate.split("/");
		sDate=getArr[2].toString() + getArr[0].toString() + getArr[1].toString(); 

		getArr=eDate.split("/");
		eDate=getArr[2].toString() + getArr[0].toString() + getArr[1].toString(); 
//**********************Start:Current Date********************************************
		if (eDate < sDate)
			{
				document.getElementById(picid).style.display="none";
				//document.getElementById(picid).src="tro_none.png";
			}
		var currDt=new Date();
		var month=(currDt.getMonth() + 1).toString();
		var day=(currDt.getDate()).toString();
		if (day.length<2)
			{
				day="0" + day.toString();	
			}
		if (month.length<2)
			{
				month="0" + month.toString();	
			}
		var myDt=currDt.getFullYear().toString() + month + day;
		var imgRoot="/Content/EventsLandingZip/default/Assets/Images/EpIcons/"
		//alert("current dt:" + myDt + " sdate:" + sDate + " edate:" + eDate);	
		//**********************End:Current Date********************************************
		//alert("curr Date:-" + currDt.getFullYear().toString());
		if (myDt >= sDate && myDt <= eDate)
		{
			document.getElementById(picid).src=imgRoot + folderName + "/" + "green.png";
			document.getElementById(picid).alt=document.getElementById(picid).title="Running";
			document.getElementById("Spn" + picid).innerHTML="green_" + folderName ;
			document.getElementById("Spn" + picid).style.display = "none";
		}
		else if ( myDt > eDate)
		{
			document.getElementById(picid).src=imgRoot + folderName + "/" + "gray.png";	
			document.getElementById(picid).alt=document.getElementById(picid).title="Over";
			document.getElementById("Spn" + picid).innerHTML="gray_" + folderName ;	
			document.getElementById("Spn" + picid).style.display = "none";
		}
		else if (myDt < sDate)
		{
		//**********************Increase Date by one week*************************************
			msDate = new Date(msDate);
			msDate = new Date(msDate.getFullYear(), msDate.getMonth(), msDate.getDate()-7); 
			 month=(msDate.getMonth() + 1).toString();
			 day=(msDate.getDate()).toString();
				if (day.length<2)
					{
						day="0" + day.toString();	
					}
				if (month.length<2)
					{
						month="0" + month.toString();	
					}
			sDate=msDate.getFullYear().toString() + month + day;
			//alert(sDate);
			if (myDt < sDate)
			{document.getElementById(picid).src=imgRoot + folderName + "/" + "blue.png";
			document.getElementById("Spn" + picid).innerHTML="blue_" + folderName ;			
			}
			else
			{document.getElementById(picid).src=imgRoot + folderName + "/" + "green.png";
			document.getElementById("Spn" + picid).innerHTML="green_" + folderName ;			
			}
			document.getElementById(picid).alt=document.getElementById(picid).title="Upcoming";
			document.getElementById("Spn" + picid).style.display = "none";
		}
	}

