function listingajax(inp,ajaxtyp,pageid){
	document.getElementById('divajax').innerHTML="<table width='780'><tr><td align='center' width='100%' valign='middle' style='padding-top:200px;'><img src='/images/loading_circle.gif'></td></tr><tr><td valign=middle align='center'><font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-transform: capitalize; color: #999999;';>LOADING...</font></td></tr></table>";
	var ajaxRequest1;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest1 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest1.onreadystatechange = function(){
		if(ajaxRequest1.readyState == 4){
			var ajaxDisplay1 = document.getElementById('divajax');
			ajaxDisplay1.innerHTML = ajaxRequest1.responseText;
		}
	}//end common to all
	if(ajaxtyp=="sub"){
		var queryString = "page_id="+pageid+"&tp=" + inp;
		//alert( "video-listing.php?" + queryString);
	//	ajaxRequest1.open("GET", "list_video.php?" + queryString, true);
		ajaxRequest1.open("GET", "list_level2subcatvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="level2sub"){
		var queryString = "page_id="+pageid+"&tp=" + inp;
		//alert( "video-listing.php?" + queryString);
	//	ajaxRequest1.open("GET", "list_video.php?" + queryString, true);
		ajaxRequest1.open("GET", "list_level2vdos.php?" + queryString, true);
	}
	if(ajaxtyp=="main"){
		if(inp==1){
			if(pageid=="")
				var queryString = "page_id="+pageid+"&tp=" + inp;
			else
				var queryString = "page_id="+pageid+"&tp=" + inp;
		}
		else{
			var queryString = "tp=" + inp;
		}
		ajaxRequest1.open("GET", "list_catvdos.php?" + queryString, true);
		
	}
	if(ajaxtyp=="channel"){
		var queryString = "tp=" + inp + "&typevdo=" +ajaxtyp;
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="region"){
		var queryString = "tp=" + inp + "&typevdo=" +ajaxtyp;
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="sector"){
		var queryString = "tp=" + inp + "&typevdo=" +ajaxtyp;
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	ajaxRequest1.send(null); 
}


function callme(id){
	this.menu = document.getElementById(id);
	this.submenus = this.menu.getElementsByTagName("div");
	var done_once=0;
	for (var i = 0; i < this.submenus.length; i++){
		this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
		//	alert(this.parentNode.id);
			listingajax(this.parentNode.id,'channel');
			done_once=1;
		};
	}

}
function callregions(id){
	this.menu = document.getElementById(id);
	this.submenus = this.menu.getElementsByTagName("div");
	var done_once=0;
	for (var i = 0; i < this.submenus.length; i++){
		this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
		//	alert(this.parentNode.id);
			listingajax(this.parentNode.id,'region');
			done_once=1;
		};
	}

}
function callsectors(id){
	this.menu = document.getElementById(id);
	this.submenus = this.menu.getElementsByTagName("div");
	var done_once=0;
	for (var i = 0; i < this.submenus.length; i++){
		this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
		//	alert(this.parentNode.id);
			listingajax(this.parentNode.id,'sector');
			done_once=1;
		};
	}

}

function index_ajax(ajaxinp){
		if (ajaxinp==1){
			document.getElementById("img2").src="images/new-releases-1.gif";
			document.getElementById("img3").src="images/channel-btn.gif";
			document.getElementById("img4").src="images/region-btn.gif";
			document.getElementById("img5").src="images/company_showcase-1.gif";
			document.getElementById("img1").src="images/featured_tab2.gif";
			
		}
		else if (ajaxinp==2){
			document.getElementById("img1").src="images/featured_tab1.gif";
			document.getElementById("img2").src="images/new-releases-2.gif";
			document.getElementById("img3").src="images/channel-btn.gif";
			document.getElementById("img4").src="images/region-btn.gif";
			document.getElementById("img5").src="images/company_showcase-1.gif";
		
		}
		
		else if (ajaxinp==3){
			document.getElementById("img1").src="images/featured_tab1.gif";
			document.getElementById("img2").src="images/new-releases-1.gif";
			document.getElementById("img3").src="images/channel-btn-2.gif";
			document.getElementById("img4").src="images/region-btn.gif";
			document.getElementById("img5").src="images/company_showcase-1.gif";
			
		}
		else if (ajaxinp==4){
			document.getElementById("img1").src="images/featured_tab1.gif";
			document.getElementById("img2").src="images/new-releases-1.gif";
			document.getElementById("img3").src="images/channel-btn.gif";
			document.getElementById("img4").src="images/region-btn2.gif";
			document.getElementById("img5").src="images/company_showcase-1.gif";
		//	alert(document.getElementById("img4").src);
		}
		else if (ajaxinp==5){
			document.getElementById("img1").src="images/featured_tab1.gif";
			document.getElementById("img2").src="images/new-releases-1.gif";
			document.getElementById("img3").src="images/channel-btn.gif";
			document.getElementById("img4").src="images/region-btn.gif";
			document.getElementById("img5").src="images/company_showcase-2.gif";
			
		}
		
	//	 document.getElementById("img"+ajaxinp).src=path1;
	document.getElementById('divajax').innerHTML="<table width='680'><tr><td align='center' width='100%' valign='middle' style='padding-top:200px;'><img src='/images/loading_circle.gif'></td></tr><tr><td valign=middle align='center'><font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-transform: capitalize; color: #999999;';>LOADING...</font></td></tr></table>";
	var ajaxRequest1;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest1 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest1.onreadystatechange = function(){
		if(ajaxRequest1.readyState == 4){
			var ajaxDisplay1 = document.getElementById('divajax');
			ajaxDisplay1.innerHTML = ajaxRequest1.responseText;
		}
	}
	
	var queryString = "tp=" + ajaxinp;
	ajaxRequest1.open("GET", "index_ajax.php?" + queryString, true);
	
	ajaxRequest1.send(null); 
}


function black(imgid,act){
	if (imgid==1)
	{
		path1="images/categories-btn.gif";
		path2="images/categories-btn2.gif";
	}
	if (imgid==2)
	{
		path1="images/channel-btn-2.gif";
		path2="images/channel-btn.gif";
	}
	if (imgid==3)
	{
		path1="images/region-btn2.gif";
		path2="images/region-btn.gif";
	}
	if (imgid==4)
	{
		path1="images/industrysector-btn2.gif";
		path2="images/industrysector-btn.gif";
	}
	if(act=="over"){
		document.getElementById("img"+imgid).src=path1;
	}
	if(act=="out"){
		if(document.getElementById("img"+imgid).src.indexOf(path1)!="-1"){
			document.getElementById("img"+imgid).src=path1;
		}else{
		  document.getElementById("img"+imgid).src=path2;
		}
	}
}

function toggleimg(ajaxinp){
	if (ajaxinp==1){
			document.getElementById("img2").src="images/channel-btn.gif";
			document.getElementById("img3").src="images/region-btn.gif";
			document.getElementById("img4").src="images/industrysector-btn.gif";
			path1="images/categories-btn.gif";
			
		}
		if (ajaxinp==2){
			document.getElementById("img1").src="images/categories-btn2.gif";
			document.getElementById("img3").src="images/region-btn.gif";
			document.getElementById("img4").src="images/industrysector-btn.gif";
			path1="images/channel-btn-2.gif";
			
		}
		if (ajaxinp==3){
			document.getElementById("img1").src="images/categories-btn2.gif";
			document.getElementById("img2").src="images/channel-btn.gif";
			document.getElementById("img4").src="images/industrysector-btn.gif";
			path1="images/region-btn2.gif";
			
		}
		if (ajaxinp==4){
			document.getElementById("img1").src="images/categories-btn2.gif";
			document.getElementById("img2").src="images/channel-btn.gif";
			document.getElementById("img3").src="images/region-btn.gif";
			path1="images/industrysector-btn2.gif";
			
		}
		 document.getElementById("img"+ajaxinp).src=path1;
}

function advsearch_ajax(ajaxtyp){
	if(ajaxtyp!=1)
		document.getElementById('divajax').innerHTML="<table width='100%'><tr><td align='center' width='100%' valign='middle' style='padding-top:200px;'><img src='/images/loading_circle.gif'></td></tr><tr><td valign=middle align='center'><font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-transform: capitalize; color: #999999;';>LOADING...</font></td></tr></table>";
	var ajaxRequest1;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest1 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest1.onreadystatechange = function(){
		if(ajaxRequest1.readyState == 4){
			var ajaxDisplay1 = document.getElementById('divajax');
			ajaxDisplay1.innerHTML = ajaxRequest1.responseText;
		}
	}
if(ajaxtyp==1){
//	alert(document.frmvdosearch.cnt_region.value);
	var srchregion="";
	var cnt_region=document.frmvdosearch.cnt_region.value;
	for(var i=1;i<=cnt_region;i++){
		   var chk="rgn_arr"+i;
		   var a="document.frmvdosearch."+chk+".checked";
		   if(eval(a)==true){
			var b="document.frmvdosearch."+chk+".value";
		//	alert(b);
		  	var srchregion =srchregion + eval(b)+",";
		   }
		}
	var srchcategory="";
	var cnt_category=document.frmvdosearch.cnt_category.value;
	for(var i=1;i<=cnt_category;i++){
	   var chk="subcat_arr"+i;
	   var a="document.frmvdosearch."+chk+".checked";
	   if(eval(a)==true){
		var b="document.frmvdosearch."+chk+".value";
	//	alert(b);
		var srchcategory =srchcategory + eval(b)+",";
	   }
	}
	var srchmaincategory="";
	var cnt_maincategory=document.frmvdosearch.cnt_maincategory.value;
	for(var i=1;i<=cnt_maincategory;i++){
	   var chk="cat_arr"+i;
	   var a="document.frmvdosearch."+chk+".checked";
	   if(eval(a)==true){
		var b="document.frmvdosearch."+chk+".value";
	//	alert(b);
		var srchmaincategory =srchmaincategory + eval(b)+",";
	   }
	}
	var srchchannel="";
	var cnt_channel=document.frmvdosearch.cnt_channel.value;
	for(var i=1;i<=cnt_channel;i++){
	   var chk="chnl_arr"+i;
	   var a="document.frmvdosearch."+chk+".checked";
	   if(eval(a)==true){
		var b="document.frmvdosearch."+chk+".value";
	//	alert(b);
		var srchchannel =srchchannel + eval(b)+",";
	   }
	}
	var srchsector="";
	var cnt_isector=document.frmvdosearch.cnt_isector.value;
	for(var i=1;i<=cnt_isector;i++){
	   var chk="catg_arr"+i;
	   var a="document.frmvdosearch."+chk+".checked";
	   if(eval(a)==true){
		var b="document.frmvdosearch."+chk+".value";
	//	alert(b);
		var srchsector =srchsector + eval(b)+",";
	   }
	}
	var queryString = "typevdo=advsearch&srchkeyword="+document.frmvdosearch.title.value+"&srchregion="+srchregion+"&srchsubcategory="+srchcategory+"&srchcategory="+srchmaincategory+"&srchchannel="+srchchannel+"&srchsector="+srchsector;
//	alert(queryString);
	ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
}
else if(ajaxtyp==2){
	var queryString = "typevdo=search&srchcateg=" +document.srchform.category.value+ "&srchkeyword="+document.srchform.keyword.value+"&srchregion="+document.srchform.region.value+"&srchchannel="+document.srchform.channel.value+"&srchcompany="+document.srchform.company.value;
	//	alert(queryString);
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
}
else
	ajaxRequest1.open("GET", "search_vdos.php", true);
ajaxRequest1.send(null); 
}

function advsearch_againajax(inp,ajaxtyp,pageid){
	document.getElementById('divajax').innerHTML="<table width='100%'><tr><td align='center' width='100%' valign='middle' style='padding-top:200px;'><img src='/images/loading_circle.gif'></td></tr><tr><td valign=middle align='center'><font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-transform: capitalize; color: #999999;';>LOADING...</font></td></tr></table>";
	var ajaxRequest1;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest1 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest1.onreadystatechange = function(){
		if(ajaxRequest1.readyState == 4){
			var ajaxDisplay1 = document.getElementById('divajax');
			ajaxDisplay1.innerHTML = ajaxRequest1.responseText;
		}
	}
	if(ajaxtyp=="search"){
		var queryString = "page_id="+pageid+"&typevdo=search&srchcateg=" +document.srchform.category.value+ "&srchkeyword="+document.srchform.keyword.value+"&srchregion="+document.srchform.region.value+"&srchchannel="+document.srchform.channel.value+"&srchcompany="+document.srchform.company.value;
	//	alert(queryString);
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="advsearch"){
		var queryString = "page_id="+pageid+"&typevdo=advsearch";
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="channel"){
		var queryString = "page_id="+pageid+"&tp=" + inp + "&typevdo=channel";
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="region"){
		var queryString = "page_id="+pageid+"&tp=" + inp + "&typevdo=region";
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
	if(ajaxtyp=="sector"){
		var queryString = "page_id="+pageid+"&tp=" + inp + "&typevdo=sector";
		ajaxRequest1.open("GET", "list_channelvdos.php?" + queryString, true);
	}
		ajaxRequest1.send(null); 
}

function popmail(n_id){
	MM_openBrWindow('mail_video.php?vdo_id='+n_id,'mail','scrollbars=yes,width=530,height=480')
}

function openWindow(url,w,h,tb,stb,l,mb,sb,rs,x,y)
{
	var t=(document.layers)? ',screenX='+x+',screenY='+y: ',left='+x+',top='+y; //A LITTLE CROSS-BROWSER CODE FOR WINDOW POSITIONING
	tb=(tb)?'yes':'no'; stb=(stb)?'yes':'no'; l=(l)?'yes':'no'; mb=(mb)?'yes':'no'; sb=(sb)?'yes':'no'; rs=(rs)?'yes':'no';
	var x=window.open(url, 'newWin'+new Date().getTime(), 'scrollbars='+sb+',width='+w+',height='+h+',toolbar='+tb+',status='+stb+',menubar='+mb+',links='+l+',resizable='+rs+t);
	x.focus();
							
}


//function for showing flash on click of title of video
function showvdo(inp){
	if(document.getElementById("sp"+inp).style.display=="none"){
		document.getElementById("sp"+inp).style.display="block";
		document.getElementById("img"+inp).src="images/circle-orange.gif";
		
	}
	else if(document.getElementById("sp"+inp).style.display=="block"){
		document.getElementById("sp"+inp).style.display="none";
		document.getElementById("img"+inp).src="images/circle-blue.gif";
	}
}

function trim(str){
	while (str.charAt(0) == ' '){
		str = str.substring(1);
	 }
	while (str.charAt(str.length - 1) == ' '){
		str = str.substring(0, str.length - 1);
	 }
		return str;

	}
function echeck(str) {
		 var at="@";
		 var dot=".";
		 var lat=str.indexOf(at);
		 var lstr=str.length;
		 var ldot=str.indexOf(dot);
		 if (str.indexOf(at)==-1){
		     invmail=1;
		 }
		 if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  invmail=1;
		 }
		 if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		  invmail=1;
		 } 
		 if (str.indexOf(at,(lat+1))!=-1){
		  invmail=1;
		 }
		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		  invmail=1;
		 }
		 if (str.indexOf(dot,(lat+2))==-1){
		  invmail=1;
		 }
		 if (str.indexOf(" ")!=-1){
		  invmail=1;
		 }
		//invmail=0;
		 return invmail;
	}
//*****************************************************************************************************
//function for validating contact form
function validate_contact(){
		var err_name=0;
		var err_mail=0;
		var err_title=0;
		var err_content=0;
		var err_con=0;
		var cal="document.contact_form"
		if(trim(document.contact_form.author_name.value)==""){
			document.getElementById('tdauthor_name').src='images/incorrect.gif';
			document.getElementById('tdcolauthor_name').style.color="#cc0000";
		//	document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_name=1;
		}
		else{
			document.getElementById('tdauthor_name').src='images/correct.gif';
			document.getElementById('tdcolauthor_name').style.color="#000000";
			err_name=0;
		}
		if(trim(document.contact_form.email.value)==""){
			document.getElementById('tdemail').src='images/incorrect.gif';
			document.getElementById('tdcolemail').style.color="#cc0000";
		//	document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_mail=1;
		}
		else{
			invmail=0;
			invemail=echeck(trim(document.contact_form.email.value));
			if(invmail==1){
				document.getElementById('tdemail').src='images/incorrect.gif';
				document.getElementById('tdcolemail').style.color="#cc0000";
		//		document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
				err_mail=1;
			}
			else{
				document.getElementById('tdemail').src="images/correct.gif";
				document.getElementById('tdcolemail').style.color="#000000";
				err_mail=0;
			}
		}
		if(trim(document.contact_form.title.value)==""){
			document.getElementById('tdtitle').src='images/incorrect.gif';
			document.getElementById('tdcoltitle').style.color="#cc0000";
		//	document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_title=1;
		}
		else{
			document.getElementById('tdtitle').src='images/correct.gif';
			document.getElementById('tdcoltitle').style.color="#000000";
			err_title=0;
		}
		if(trim(document.contact_form.content.value)==""){
			document.getElementById('tdcontent').src='images/incorrect.gif';
			document.getElementById('tdcolcontent').style.color="#cc0000";
			//document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_content=1;
		}
		else{
			document.getElementById('tdcontent').src='images/correct.gif';
			document.getElementById('tdcolcontent').style.color="#000000";
			err_content=0;
		}	
		if(trim(document.contact_form.telephone.value)==""){
			document.getElementById('tdtelephone').src='images/incorrect.gif';
			document.getElementById('tdcoltelephone').style.color="#cc0000";
			//document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_tele=1;
		}
		else{
			if(isNaN(trim(document.contact_form.telephone.value))){
				document.getElementById('tdtelephone').src='images/incorrect.gif';
				document.getElementById('tdcoltelephone').style.color="#cc0000";
		//		document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
				err_tele=1;
			}
			else{
				document.getElementById('tdtelephone').src="images/correct.gif";
				document.getElementById('tdcoltelephone').style.color="#000000";
				err_tele=0;
			}
		}
		if(trim(document.contact_form.country.value)==""){
			document.getElementById('tdcountry').src='images/incorrect.gif';
			document.getElementById('tdcolcountry').style.color="#cc0000";
			//document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_con=1;
		}
		else{
			document.getElementById('tdcountry').src='images/correct.gif';
			document.getElementById('tdcolcountry').style.color="#000000";
			err_con=0;
		}
		if(trim(document.contact_form.txtnumber.value)==""){
			//document.getElementById('td_con').src='images/incorrect.gif';
			document.getElementById('tdcolver').style.color="#cc0000";
			//document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			err_ver=1;
		}
		else{
		//	document.getElementById('td_con').src='images/correct.gif';
			document.getElementById('tdcolver').style.color="#000000";
			err_ver=0;
		}
		if((err_name==1)||(err_title==1)||(err_mail==1)||(err_content==1)||(err_tele==1)||(err_con==1)||(err_ver==1)){
			document.getElementById('diverrmsg').innerHTML="We need your valid input in all fields marked in red.";
			return false;

		}
	}

	function validate_name(input){
		var cal="document.contact_form."+input;
			if(trim(eval(cal).value)==""){
				//document.getElementById('diverrmsg').innerHTML="We need your input in all fields marked in red.";
				document.getElementById('td'+input).src='images/incorrect.gif';
				document.getElementById('tdcol'+input).style.color="#cc0000";
				//eval(cal).focus();
				
			}
			else{
				if(input=="email"){
					invmail=0;
					invemail=echeck(trim(eval(cal).value));
					//alert(invemail);
					if(invmail==1){
						document.getElementById('tdemail').src='images/incorrect.gif';
						document.getElementById('tdcolemail').style.color="#cc0000";
					//	eval(cal).focus();
						
					}
					else{
						document.getElementById('tdemail').src="images/correct.gif";
						document.getElementById('tdcolemail').style.color="#000000";
					}
				}
				else if(input=="telephone"){
					if(isNaN(trim(eval(cal).value))){
						document.getElementById('tdtelephone').src='images/incorrect.gif';
						document.getElementById('tdcoltelephone').style.color="#cc0000";
					//	eval(cal).focus();
						
					}
					else{
						document.getElementById('tdtelephone').src="images/correct.gif";
						document.getElementById('tdcoltelephone').style.color="#000000";
					}
				}
				else{
					document.getElementById('td'+input).src="images/correct.gif";
					document.getElementById('tdcol'+input).style.color="#000000";
				}
			}
			
		
if((trim(document.contact_form.author_name.value)!="")&&(trim(document.contact_form.telephone.value)!="")&&(trim(document.contact_form.country.value)!="")&&(trim(document.contact_form.email.value)!="")&&(trim(document.contact_form.content.value)!="")&&(trim(document.contact_form.title.value)!="")){
			document.getElementById('diverrmsg').innerHTML="";
		}
		
	}
	//*********************************************************************

	//**************************function for multiple vdo clips on watch_multiplevdos *********************************************
	function change_clip(inp1,inp2){
	document.getElementById('divclips').innerHTML="<table width='100%'><tr><td align='center' width='100%' valign='middle' style='padding-top:45px;'><img src='/images/loading_circle.gif'></td></tr><tr><td valign=middle align='center'><font style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-transform: capitalize; color: #999999;';>LOADING...</font></td></tr></table>";
	var ajaxRequest1;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest1 = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest1 = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest1 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest1.onreadystatechange = function(){
		if(ajaxRequest1.readyState == 4){
			var ajaxDisplay1 = document.getElementById('divclips');
			ajaxDisplay1.innerHTML = ajaxRequest1.responseText;
		}
	}//end common to all
	var queryString = "tp1="+inp1+"&tp2=" + inp2;
		//alert( "video-listing.php?" + queryString);
	//	ajaxRequest1.open("GET", "list_video.php?" + queryString, true);
	ajaxRequest1.open("GET", "show_clips.php?" + queryString, true);
	
	ajaxRequest1.send(null); 
}

//********************************************************************************************************************
