﻿// JScript 文件


var me; //代表swf的id 
//获取正确的引用 
var am=6;
function AutoCapture()
{
	am = am - 1 ;
	spanAuto.style.display="none";
	if ( am==0)
	{
		
		spanAuto.style.display="none";
		am=6;
		Capture();
		document.all("btnAutoCap").value = "自动拍摄,5妙后快门";
	}
	else
	{
		if (am==1)
		{
			 document.all("btnAutoCap").value= "喀嚓";
		}
		else
		{
			document.all("btnAutoCap").value= am;
		}
		
		setTimeout('AutoCapture()',1000);
	}
}

function getID(swfID) { 
 
   if (navigator.appName.indexOf("Microsoft") > -1) { 
      me = window[swfID]; 
   
   } else { 
      me = document[swfID]; 
  
   }
} 

function Changepic(str){ 
   me.Changepic(str);

} 
function Moveleft(Num){ 
   me.Moveleft(Num);

} 

function Moveright(Num){ 
   me.Moveright(Num);

}

function Rotationl(Num){ 
   me.Rotationl(Num);

}

function Rotationr(Num){ 
   me.Rotationr(Num);

}



function Iniok()
{
	
}
function Inifail()
{
	 jsmsgbox("初始化失败,查看下你的摄像头有没有插在电脑上");
}

function Initial()
{
try{
	document.all("btnCap").disabled=false;
	document.all("btnAutoCap").disabled=false;
	setTimeout("me.Initial()",300);
	}
	catch(err)
	{}
}

function Upfail()
{
  jsmsgbox("文件上传失败");
 
}

function Capok()
{
	document.all("btnUpload").disabled=false;
	jsmsgbox("拍照成功,可以重新再拍,满意的话点 保存编辑按钮,编辑保存你的照片")
}


function Capture()
{
	document.all("btnInit").value="不满意，重新拍";
	document.all("btnCap").disabled=true;
	document.all("btnAutoCap").disabled=true;
	me.Capture();

}

function checkform()
{
	return true;
/*
temp1=document.getElementById("username");
temp2=document.getElementById("usercontent");

if (temp1.value.length>0 && temp2.value.length>0){return(true);}else{alert("下面的东西一定要填写");return(false);}
*/
}

function Uppic(f)
{
if(checkform()){
 /* var temp=document.getElementById("maskdiv");
  temp.style.width=screen.availWidth;
  temp.style.height=screen.availHeight;
  temp.style.display="block";*/
  me.Uppic(f);}

}

function Showversion()
{
  me.Showversion();

}

function Zoomout(num)
{
  me.Zoomout(num);

}


function Zoomin(num)
{
  me.Zoomin(num);

}

function Moveup(num)
{
  me.Moveup(num);

}

function Movedown(num)
{
  me.Movedown(num);

}

function showpaizhao()
{
    
    if ($("divother").innerHTML=="")
    {
         var ul="catch/paizhao.htm?88d318"
		 
		 setdivdata($("divother"),ul,"")
    } 
	$("divmain").style.display="none";
	$("divother").style.display="";
	
	getID('aojie');
	 
	Initial();
}
function tuijian()
{
    alert("");
    
         var ul="myphoto/tuijian.htm?88d318"
		 alert(ul)
		 setdivdata($("divalert1"),ul,"")
   
}
function closepaizhao()
{
	$("divmain").style.display="";
	$("divother").style.display="none";
	getID('aojie');
	Initial();

}
function alertlogo()
{
	var str='<li>本站比Photoshop的在线版本早了5年</li><li>2003 年获得中国原创软件大赛二等奖</li><li>站长EMail:nittystone@hotmail.com</li>';
	alert(str);
}