function Layer(acao){
  if (acao == 'false')
	document.getElementById("layer_video").style.visibility = 'hidden';
  else
    document.getElementById("layer_video").style.visibility = 'visible';
}
function ajaxInit() {
	var req;
		try {
		req = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
				} catch(ex) {
					try {
						req = new XMLHttpRequest();
						} catch(exc) {
							alert("Esse browser n?o tem recursos para uso do Ajax");
							req = null;
						  }
						}
					}
			 return req;
}

function SendContent(box,url,dir,id,video) {
ajax = ajaxInit();
	if(ajax) {
	ajax.open("GET",url+'?dir='+dir+'&id='+id+'&video='+video, true);
	ajax.onreadystatechange = function() {
		if(ajax.readyState == 4) {
			if(ajax.status == 200) {
			document.getElementById(box).innerHTML = ajax.responseText;
			} else {
				alert(ajax.statusText);
					}
		}
	}
ajax.send(null);
}
}

function ClippingVideo(a,box,url,dir,id,video){
Layer(a);
SendContent(box,url,dir,id,video);
}