<!--//

function Play()
{  
  CreateX();     
  
  try{   
        document.WebCamX1.PlayX();  
      
   }catch(e){
	alert("Error on Playing Video");
   }   
   
}



function ChangeCam(iNum) {
	try{
		document.WebCamX1.ChangeCamX(iNum);
	} catch(e) {
		alert("Error trying to change cams");
	}
}

function ReConnect()
{  
     
  try{   
        document.WebCamX1.ReConnectX();  
      
   }catch(e){
	alert("Error reconnecting");
   }   
   
}


function Stop()
{
  try{
   
       document.WebCamX1.StopX();  
      
   }catch(e){
	alert("Error Stopping Kiddie Cam");
   }
   
   	
}

var toggle = 0;

function ChangeSize() {
	if (toggle==1) {
		winwidth = 320;
		winheight = 240;
		toggle = 0;
	} else {
		winwidth = 480;
		winheight = 360;
		toggle = 1;
	}
	try{
		document.WebCamX1.ChangeSizeX(winwidth,winheight);
	} catch(e) {
		alert("Error trying to change cam size");
	}
}


function ChangeText(iNum) {
        if (iNum == 0) {
                camName.innerText = "Camera One";
        }else if (iNum == 1) {
                camName.innerText = "Camera Two";
        }else if (iNum == 2) {
                camName.innerText = "Camera Three";
		} else {
                camName.innerText = "Camera Four";
        }
}


function SnapShotX()
{
 try{
  
   document.WebCamX1.SnapShotX();
       
   }catch(e){
	alert("Error with Snapshot");
   }

}



function CreateX()
{  
  try{
  	document.WebCamX1.CreateX();
   }catch(e){
	alert("Error createx");
   }

}

function DestroyX()
{  
  try{
    document.WebCamX1.DestroyX();
  }catch(e){
	alert("Error Destroying");
   }

}
// -->
