function loadPage(urlId, elementId, width, height) {
	var requestUrl = urlId;
	var resourcesPath = "";
    var html5Url = "";
	if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
		resourcesPath = "GetVideo?id="+urlId;
		var response = '';
		/*$.ajax({ method: "POST",   
		         url: resourcesPath,   
		         async: false,
		         dataType:"text",
		         success : function(data){
			       html5Url = data;
		         }
		});
		*/
		getvideocall(elementId,urlId,width, height);
	}
	else
	{
		//var scriptString ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"   id="ArtisticYogaBdi" width="'+width+'" height="'+height+'"    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">   <param name="movie" value="ArtisticYogaBdi.swf?id=V_'+requestUrl+'" />   <param name="quality" value="high" />   <param name="Flashvars" value="source=\"'+requestUrl+'\"" />   <param name="bgcolor" value="#444444" />   <param name="allowScriptAccess" value="sameDomain" />    <param name="allowFullScreen" value="true" />  <embed src="ArtisticYogaBdi.swf?id=V_'+requestUrl+'" quality="high" bgcolor="#444444"    width="'+width+'" height="'+height+'" name="ArtisticYogaBdi" align="middle"    play="true"    loop="false"    quality="high"    allowScriptAccess="sameDomain"   allowFullScreen="true"      flashvars="source='+requestUrl+'"      type="application/x-shockwave-flash"    pluginspage="http://www.adobe.com/go/getflashplayer">   </embed> </object>';
		PlayVideo("ArtisticYogaBdi",width,height,elementId,true,requestUrl);
		//document.getElementById(elementId).innerHTML = scriptString;
	}
}

function PlayVideo(videoId,width,height,tagetId,autoplay,id)
 {
  var so = new SWFObject("ArtisticYogaBdi.swf", tagetId, width, height, "9.0.0", "#FFFFFF");
  so.addParam("flashvars","source="+id);
  so.addVariable("id",videoId);
 // so.addVariable("autoPlay", autoplay);
 // so.addParam("menu", "false");
  so.addParam("allowScriptAccess", "sameDomain");
  so.addParam("scale", "exactFit");
  so.addParam("allowFullScreen", "true");
  so.addParam("wmode", "transparent");
  so.write(tagetId);
 }
