
function taG(q,i){
	while(q.search(' ') != -1)q=q.replace(' ','_');
	q=encodeURIComponent(q);
	document.location.href="/tag/"+q;
}

function tGet(x){
	document.vse.action="javascript:taG(document.vse.q.value,"+x+")";
}


function download_vid(x){
 tools_w('/tools/download-'+x,400,300);
}

function bookmark_vid(x){
 tools_w('/tools/bookmark-'+x,400,300);
}

function webembed_vid(x){
 tools_w('/tools/embed-'+x,500,300);
}

function telafrnd_vid(x){
 tools_w('/submit_mail.php?id='+x,400,260);
}

function post_comment(x){
 tools_w('/submit_comments.php?id='+x,400,260);
}

function tools_w(url,width,height){
 options="toolbar=no,scrollbars=yes,directories=no,status=yes,menubar=no,";
 options+="resizable=yes,width="+width+",height="+height;
 window.open(url,"tools", options);
}

function fullscrn_vid(id){
 url='/tools/fullscreen-'+id;
 options="toolbar=no,scrollbars=no,status=no,menubar=no,resizable=yes,fullscreen=yes";
 if(!document.all)options+=",width="+screen.width+",height="+screen.height;
 window.open(url,"fullscreen_video", options);
 vid="http://youtube.com/v/"+id;
 if(document.all)document.getElementById("VideoPlayback").movie=vid;
 else document.getElementById("VideoPlayback").innerHTML='<embed width=425 height=373 type="application/x-shockwave-flash" src="'+vid+'"></embed>';
}
