var xmlhttp=false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } function fixPbarImg() { document.getElementById("pBarImg").src = imgPbar.src; } function PopulateProgbar() { if (xmlhttp.readyState == 4) { document.getElementById("overTop").style.width = xmlhttp.responseText+"px"; document.getElementById("overTop").innerHTML = "
  " + Math.floor(xmlhttp.responseText/3) + "% complete"; if (xmlhttp.responseText < 304) { window.setTimeout("LoadProgress()", 3000); } } } function LoadProgress() { xmlhttp.open("GET", "xml/Progress.php?umId="+ProgressId, true); xmlhttp.onreadystatechange = PopulateProgbar; xmlhttp.send(0); } function ChevyPage(num) { try { document.getElementById("MainContent").innerHTML = "

Loading...

"; xmlhttp.open("GET", "/xml/Video.php?p="+num, true); xmlhttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlhttp.onreadystatechange = ShowChevyPage; xmlhttp.send(0); } catch(e) { var Timar = window.setTimeout("100", "ChevyPage(" + num + ")"); } } function ShowChevyPage() { if (xmlhttp.readyState == 4) { if (xmlhttp.responseText.length > 0) { document.getElementById("MainContent").innerHTML = xmlhttp.responseText; } } } function RateVideo(vid, val) { try { xmlhttp.open("POST", "../xml/ChevyRate.php", true); xmlhttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); var Poster = "d="+vid+"&r="+val; xmlhttp.onreadystatechange = RateVideoReady; xmlhttp.send(Poster); } catch(e) { var Timar = window.setTimeout("100", "RateVideo(" + vid + ", " + val + ")"); } } function RateVideoReady() { if (xmlhttp.readyState == 4) { if (xmlhttp.responseText.length > 0) { document.getElementById("VideoRate").innerHTML = xmlhttp.responseText; } } } function SaveComment() { var TagParcel = document.getElementById("AddVideoComments").value; if (TagParcel == "") return false; var Poster = "m=" + document.getElementById("cmid").value + "&d="+TagParcel; document.getElementById("AddVideoComments").value = "Saving..."; document.getElementById("AddVideoComments").disabled = true; document.getElementById("CommEditSave").value = "Saving..."; document.getElementById("CommEditSave").disabled = true; xmlhttp.open("POST", "../xml/Comment.php?m=", true); xmlhttp.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlhttp.onreadystatechange = PopulateComment; xmlhttp.send(Poster); } function PopulateComment() { if (xmlhttp.readyState == 4) { document.getElementById("CommentVideo").innerHTML = xmlhttp.responseText; document.getElementById("AddVideoComments").disabled = false; document.getElementById("AddVideoComments").value = ""; document.getElementById("CommEditSave").value = "Save"; document.getElementById("CommEditSave").disabled = false; } }