var videoid = null;

function countdivs() {
var count = (document.getElementById("videoarchive").getElementsByTagName("div").length/10);
var countdivsm = Math.round(count/10);
var varmosm = count/10;
if (countdivsm != varmosm) {varmosm +=1; }
var countdivbig = Math.round(count/6);
var varmobig = count/6;
if (countdivbig != varmobig) {varmobig +=1; }
document.getElementById("searchresults").innerHTML  = "There are "+count+" videos available";
	for (i=1;i<=varmosm; i++){
		x = (i * 10) - 10;
		document.getElementById("jquery-object"+x).style.display = 'block';
	}
	for (i=1;i<=varmobig; i++){
		x = (i * 10) - 10;
		document.getElementById("bigjquery-object"+x).style.display = 'block';
	}
var firstvideo = $('#positionid:first').html();
var firstpos = $('#posid:first').html();
$paneTarget = $('#videoarchive');
var movepos = "#pos"+firstpos;
if (firstpos != null) { $paneTarget.stop().scrollTo( movepos , 800 ); }
else { document.getElementById("reultsdisplay").className='searchresultsclosed';}
var pvid = getURLParam("vid");
if (pvid != "") { firstvideo = pvid; }
if (firstvideo != null) { videoid = firstvideo; videostartload(firstvideo); }
}

function loadcommunity() {

if(document.getElementById("kwicksbody"))
{
	var element = document.getElementById("loadingbar");
	element.style.visibility = 'hidden';
	element.style.display = 'none';
}

var firstvideo = $('#positionid:first').html();
var firstpos = $('#posid:first').html();
$paneTarget = $('#videoarchive');
var movepos = "#pos"+firstpos;
var pvid = getURLParam("vid");
if (pvid != "") { firstvideo = pvid; }
if (firstvideo != null) { videoid = firstvideo; videostartloadone(firstvideo); }

}

function videoload(vidid) {
	switch(vidid)
	{
	case "1":
	  return ("http://download.microsoft.com/documents/uk/teched2008/wraps/DEVWrap_Monday.wmv");
	case "2":
	  return ("http://download.microsoft.com/documents/uk/teched2008/wraps/DEVWrap_Tuesday.wmv");
	case "3":
	  return ("http://download.microsoft.com/documents/uk/teched2008/wraps/DEVWrap_Wednesday.wmv");
	case "4":
	  return ("http://download.microsoft.com/documents/uk/teched2008/wraps/DEVWrap_Thursday.wmv");
	case "5":
	  return ("http://download.microsoft.com/documents/uk/teched2008/wraps/DEVWrap_Friday.wmv");
	case "6":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_35_low.wmv");
	case "7":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_15_low.wmv");
	case "8":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_ITP_techtalk_123_low.wmv");
	case "9":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_techtalk_47_low.wmv");
	case "10":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_10_low.wmv");
	case "11":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_techtalk_06_low.wmv");
	case "12":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_techtalk_18_low.wmv");
	case "13":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_14_low.wmv");
	case "14":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_Dev_TEOPanel_35_low.wmv");
	case "15":
	  return ("http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/08_NA_dev_TEOPanel_05_low.wmv");
	case "16":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVChristian_Binder.wmv");
	case "17":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVGunther_Beersaerts.wmv");
	case "18":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVHans_Verbeeck.wmv");
	case "19":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVMario_Fontana.wmv");
	case "20":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVPedro_Rosa.wmv");
			  //http://download.microsoft.com/documents/uk/teched2008/tv/DEVPedro_Rosa.wmv
	case "21":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/DEVPooya_Darugar.wmv");
	case "22":
	  return ("http://download.microsoft.com/documents/uk/teched2008/tv/058_NxtGenUG_TechEdBuildUp.mp3");
	  
	  case "23":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/KEY01_Dev.wmv");
	  case "24":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/WUX312.wmv");
	  case "25":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/DEV_IV_MON_NEXTGEN_TEweb.wmv");
	  case "26":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/DEV_IV_MON_JOSE_TEweb.wmv");
	  case "27":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/DEV_MON_DAILY WRAP v2_TEweb.wmv");
	  case "28":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/060_NxtGenUG_TechEdDay1.mp3");
	  case "29":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/061_NxtGenUG_TechEdDay2.mp3");
	  case "30":
	  return ("http://download.microsoft.com/documents/uk/teched2008/Onsite/DEV_IV_MON_KEYNOTE_TEweb.wmv");
	  case "31":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IV_TUE_Caroline Phillips_TEweb.wmv");
	  case "32":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_KEYNOTE_1MIN_MON_TEweb.wmv");
	  case "33":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_MON_BILAL_TEweb.wmv");
	  case "34":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_MON_RICHARD_TEweb.wmv");
	  case "35":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_DAILY WRAP_TUE v2_TEweb.wmv");
	  case "36":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IV_MON_JOSE_TEweb.wmv");
	  case "37":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IV_MON_NEXTGEN_TEweb.wmv");
	  case "38":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_Monday_Keynote iv Jason Zander_TEweb.wmv");
	  case "39":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IV_MON_HANS_TEweb.wmv");
	  case "40":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_TUE_KURT_TEweb.wmv");
	  case "41":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_TUE_GUISEPPE_TEweb.wmv");
	  case "42":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_TUE_JACEK_TEweb.wmv");
	  case "43":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IV_TUE_BRYANT_TEweb_1.wmv");
	  case "44":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_SPONSOR_TUE_PROXIM_TEweb.wmv");
	  case "45":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_SPONSOR_WED_BUSOBJECTS_TEweb.wmv");
	  case "46":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_WED_ANTHONY_TEweb.wmv");
	  case "47":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_WED_ARTEMASKIS_TEweb.wmv");
	  case "48":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_IDOL_WED_DANIEL_TEweb.wmv");
	  case "49":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_DAILY WRAP_WED v3_TEweb.wmv");
	  case "50":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/wux202.wmv");
	  case "51":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/tla402.wmv");
	  case "52":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/tla309.wmv");
	  case "53":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/dat313.wmv");
	  case "54":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/wux311.wmv");
	  case "55":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/win402.wmv");
	  case "56":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/soa303.wmv");
	  case "57":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/tla401.wmv");
	  case "58":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/dvm306.wmv");
	  case "59":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/tla301.wmv");
	  case "60":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/arc206.wmv");
	  
	  case "61":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_WRAP_THUR v3_TEweb.wmv");
	  case "62":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_SPONSOR_THUR_HP_TEweb_1.wmv");
	  case "63":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_WRAP_FRI_TEweb.wmv");
	  case "64":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/DEV_SPONSOR_THUR_DevExpress_TEweb.wmv");
	  
	  case "65":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/arc201.wmv");
	  case "66":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/dat303.wmv");
	  case "67":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/dat310.wmv");
	  case "68":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/dvm201.wmv");
	  case "69":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/dvm304.wmv");
	  case "70":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/emb207.wmv");
	  case "72":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/ofc309_.wmv");
	  case "73":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/pdc205.wmv");
	  case "74":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/upd/soa304.wmv");
	  case "75":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/tla311.wmv");
	  case "76":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/SessionDev/new/wux402.wmv");
	  case "77":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/063_NxtGenUG_TechEdDay4.mp3");
	  case "78":
	  return ("http://download.microsoft.com/documents/uk/teched2008/onsite/062_NxtGenUG_TechEdDay3.mp3");
	  case "79":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/tla304.wmv");
	  case "80":
	  return ("mms://wm.microsoft.com/ms/emea/TechEd2008/tla324.wmv");
	  

	default: 
	  return ("novideo"); // mms://wm.microsoft.com/ms/emea/TechEd2008/DEV_MAIN_EDIT.wmv
	} 

}