﻿// IC WCMS Video JavaSricpt Functions Library
// IruCom WebCMS Version 4.0
// Copyright Pragash Irudayam ( IruCom systems )
// Licence only for one Domain. No changes or addons are allowed without prior permisssion from Pragash Irudayam (IruCom systems)

// Needs the IruCom WebCMS Basic Library.

function IC_JS_Display_Video(mv_box_id, mv_url, mv_application)
{
	/* Only for Standard Browsers*/
	
	if (typeof(document.getElementById) != 'undefined') 
	{
		var display_box = document.getElementById(mv_box_id);		  	
    }    
    else 
	{
        return false;
		
    }
	
	if(IC_JS_Delete_ChildNodes(mv_box_id))
	{
		var mv_obj = document.createElement("object");
		mv_obj.setAttribute('id', 'ms_id5');
		mv_obj.setAttribute('width', '360');
		mv_obj.setAttribute('height', '260');
		mv_obj.setAttribute('type', mv_application);
		mv_obj.setAttribute('data', mv_url);
				
		var mv_obj_para_1 = document.createElement("param");
		mv_obj_para_1.setAttribute('name', 'movie');	
		mv_obj_para_1.setAttribute('value', mv_url);			
			
		var mv_obj_para_2 = document.createElement("param");
		mv_obj_para_2.setAttribute('name', 'autoplay');	
		mv_obj_para_2.setAttribute('value', 'true');	
		
		var mv_obj_para_con = document.createElement("param");
		mv_obj_para_con.setAttribute('name', 'controller');	
		mv_obj_para_con.setAttribute('controller', 'true');
		
		var mv_obj_emb = document.createElement("embed");		
		mv_obj_emb.setAttribute('src', mv_url);
		mv_obj_emb.setAttribute('width', '360');
		mv_obj_emb.setAttribute('height', '260');
		mv_obj_emb.setAttribute('type', mv_application);
		
			
		mv_obj.appendChild(mv_obj_para_1);
		mv_obj.appendChild(mv_obj_para_2);		
		mv_obj.appendChild(mv_obj_para_con);				
		
		// Embed
		mv_obj.appendChild(mv_obj_emb);		
		// Insert Element to the Display Box
		display_box.appendChild(mv_obj);
	
	}


}