 // submit video comment to product comment
function subComment(theform)
{
	if(online==false)
	{
	  setControl("subComment(document."+theform.name+")");
	  login();
	  return false;
	}
	if(theform.CommentDtls.value.length<4)
	  {
		alert("please add your product comment details.");
		theform.CommentDtls.focus();
	    return false;
	  }
	  theform.submit();
}
// submit video comment to product comment


 // get xmlHttp//
	function getXmlHttp()
	   {
	      var xmlHttp = false;
		   try {
				 xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			   }
		   catch (e) 
		      {
				  try {
						  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
					  } 
				   catch (e2)
				      {
						  xmlHttp = false;
					  }
	         }
		   if (!xmlHttp && typeof XMLHttpRequest != 'undefined') 
			  {
				xmlHttp = new XMLHttpRequest();
			  }
		 return xmlHttp;
	   }
	var xmlHttp1 = getXmlHttp();
	var xmlHttp2 = getXmlHttp();
 // get xmlHttp//
 
 //get palyer video//
  function getPlayer(Id)
	  {
			 //alert(online);
			 //alert(defaultShow);
 			 if((!online)&&(!defaultShow))
			 {
			   setControl("getPlayer("+Id+")");
			   login();
			   return;
			 }
			 else
			 {
			   xmlHttp1.open("GET","xmlPlayer.asp?pId="+Id,true); 
			   xmlHttp1.onreadystatechange = updatePlayer;
			   xmlHttp1.send(null); 
			   //xmlHttp1.abort();
			  // alert(document.getElementById("videoBox").style.display);
		    }
	  
		}
   function updatePlayer()
        {
　 		//if(xmlHttp1.readyState == 3) 
			//{ 
　　             //document.getElementById('videoWrap').innerHTML ="loading...";
		   //}
　 		 if (xmlHttp1.readyState == 4) 
			 { 
　     			  if (xmlHttp1.status == 200) 
						  { 
						      var sText=xmlHttp1.responseText;
							  if(sText=="False")
							   {
			  					//setControl("getPlayer("+o+")");
							    login();
								//xmlHttp1.abort();
								return;
							  }
　　                            else
							  {
							     document.getElementById('videoWrap').innerHTML = xmlHttp1.responseText;

							  }
　　                          document.getElementById('videoContent').scrollIntoView(true);

					     }
		    }
		}

 //get palyer video//
 
  //get video products list//
  function getVideoList(Id,Page)
	  {
		   xmlHttp2.open("GET","xmlVideoList.asp?ClassId="+Id+"&currentpage="+Page, true); 
		   xmlHttp2.onreadystatechange = updateVideoList;
		   xmlHttp2.send(null); 
	  
		}
   function updateVideoList()
        {
　 		 if (xmlHttp2.readyState == 3) 
			 { 
　　            document.getElementById('videoProductWrap').innerHTML ="loading..";
		    }
　 		 if (xmlHttp2.readyState == 4) 
			 { 
　     			  if (xmlHttp2.status == 200) 
						  { 
　　                          document.getElementById('videoProductWrap').innerHTML = xmlHttp2.responseText;
							 //if(defaultShow==false)
　　                          //{document.getElementById('videoProductWrap').scrollIntoView(true);}
					     }
		    }
		}
  //get video products list//