function CameraEditedFunction(obj)
{

	if (obj==null)
	return;

	var camerainfo=obj.cameraInfo;
	var dv_caminfotxt = '';

	if (camerainfo)
	{

         document.getElementById('caminfo').style.display="";
		alert('camerinfo 3');

		if(camerainfo.flash_==1)
		flash='Yes';
		else 
		flash='No';
		alert('camerinfo 4');

		dv_caminfotxt += '<table><tr><td>Camera Name</td><td>&nbsp;:&nbsp;</td><td><span id="camname">'+camerainfo.cameraname+'</span></td></tr>';
		dv_caminfotxt +='<tr><td>Shutter Speed</td><td>&nbsp;:&nbsp;</td><td><span id="shutterspeed">'+ camerainfo.shutterspeed+'</span></td></tr><tr><td>Aperture Value</td><td>&nbsp;:&nbsp;</td><td><span id="aperturevalue">'+camerainfo.aperturevalue+'</span></td>';
		dv_caminfotxt +='</tr><tr><td>Iso Speed</td><td>&nbsp;:&nbsp;</td><td><span id="iso_speed">'+camerainfo.iso_speed+'</span></td></tr>';
		dv_caminfotxt +='<tr><td>Lens</td><td>&nbsp;:&nbsp;</td><td><span id="camlens">'+camerainfo.lens+'</span></td></tr><tr><td>Focal Length</td><td>&nbsp;:&nbsp;</td>';
		dv_caminfotxt +='<td><span id="focallength">'+camerainfo.focallength+'</span></td></tr><tr><td>Flash</td><td>&nbsp;:&nbsp;</td><td><span id="camflash">'+flash+'</span></td><tr><td></td><td></td><td><div align="center"><a class="blue" onclick=editCam("'+flash+'");>Edit camera info</a></div></td></tr></tr></table>';


	}else
	{
		dv_caminfotxt += 'No camera informations';

	//document.getElementById('caminfo').style.display="none";
			//alert('check here shabeer please ... i have disabled this code');
         //document.getElementById('camInfoLink').style.display="block";

	}
	document.getElementById('caminfo').style.display="";
	document.getElementById('dv_caminfo').innerHTML=dv_caminfotxt;
}

function editCamSave(){


/*
alert(document.getElementById('txt_camname').value);
alert(document.getElementById('txt_shutterspeed').value);
alert(document.getElementById('txt_aperturevalue').value);
alert(document.getElementById('txt_iso_speed').value);
alert(document.getElementById('txt_camlens').value);
alert(document.getElementById('txt_focallength').value);
*/
alert(document.getElementById('rb_camflash').value);

//    mySWF.callSWF("editCameraInfo", ["JS", f,document.getElementById('txt_camname').value]); 

    mySWF.callSWF("editCameraInfo", ["JS", document.getElementById('f').value,document.getElementById('txt_camname').value,document.getElementById('txt_shutterspeed').value,document.getElementById('txt_aperturevalue').value,document.getElementById('txt_iso_speed').value,document.getElementById('txt_camlens').value,document.getElementById('txt_focallength').value, document.getElementById('rb_camflash').value]); 


	document.getElementById('dv_caminfo').innerHTML='<div align="center" style="height:200px;"><img width="28px" height="28px" border="0" align="middle" src="images/imgloader.gif" style="margin-top:90px;"></div>';

}
function editCam(flash){
var dv_caminfo = '<table><tr><td>Camera Name</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_camname" value="'+document.getElementById('camname').innerHTML+'"></td</tr><tr><td>Shutter Speed</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_shutterspeed" value="'+document.getElementById('shutterspeed').innerHTML+'"></td</tr><tr><td>Aperture Value</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_aperturevalue" value="'+document.getElementById('aperturevalue').innerHTML+'"></td</tr><tr><td>Iso Speed</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_iso_speed" value="'+document.getElementById('iso_speed').innerHTML+'"></td</tr><tr><td>Lens</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_camlens" value="'+document.getElementById('camlens').innerHTML+'"></td</tr><tr><td>Focal Length</td><td>&nbsp;:&nbsp;</td><td><input type="text" style="width:220px" id="txt_focallength" value="'+document.getElementById('focallength').innerHTML+'"></td</tr><tr><td>Flash</td><td>&nbsp;:&nbsp;</td>';

var flashy='',flashn='';
if(flash=='Yes')flashy='checked';else flashn='checked';
dv_caminfo+='<td>On&nbsp;<input type="radio" value="1" '+flashy+' name="rb_camflash" id="rb_camflash">&nbsp;Off&nbsp;<input type="radio" value="0" '+flashn+' name="rb_camflash" id="rb_camflash">&nbsp;</td>';
dv_caminfo+='</tr><tr><td></td><td></td><td><div align="center"><input type="button" value=" Save  " onClick=editCamSave(); />&nbsp;&nbsp;<input type="button" value="Cancel" onClick=editCamCancel("'+flash+'"); /></div></td></tr></table>';
document.getElementById('dv_caminfo').innerHTML=dv_caminfo;
}

function editCamCancel(flash){
	var dv_caminfo ='<table><tr><td>Camera Name</td><td>&nbsp;:&nbsp;</td><td><span id="camname">'+document.getElementById('txt_camname').value+'</span></td</tr><tr><td>Shutter Speed</td><td>&nbsp;:&nbsp;</td><td><span id="shutterspeed">'+ document.getElementById('txt_shutterspeed').value+'</span></td</tr><tr><td>Aperture Value</td><td>&nbsp;:&nbsp;</td><td><span id="aperturevalue">'+document.getElementById('txt_aperturevalue').value+'</span></td</tr><tr><td>Iso Speed</td><td>&nbsp;:&nbsp;</td><td><span id="iso_speed">'+document.getElementById('txt_iso_speed').value+'</span></td></tr><tr><td>Lens</td><td>&nbsp;:&nbsp;</td><td><span id="camlens">'+document.getElementById('txt_camlens').value+'</span></td</tr><tr><td>Focal Length</td><td>&nbsp;:&nbsp;</td><td><span id="focallength">'+document.getElementById('txt_focallength').value+'</span></td></tr><tr><td>Flash</td><td>&nbsp;:&nbsp;</td><td><span id="camflash">'+flash+'</span></td></tr><tr><td></td><td></td><td><div align="center"><a class="blue" onclick=editCam("'+flash+'");>Edit camera info</a></div></td></tr></table>'
	document.getElementById('dv_caminfo').innerHTML=dv_caminfo;
}
