<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css"></style>
</head>
<body>
<textarea onkeydown="cmd.check();" onkeypress="cmd.check();" onkeyup="cmd.check();" id="code_THIS" style="margin: 0px; height: 1000px; width: 100%;"" ></textarea>
<style>
#code_THIS
{
background:#FFF;
border:0px #333 solid;
color:#000;
font-size:20px;
font-family:"Yekan", Courier, monospace;
direction:ltr;
text-align:left;
padding:2px;
min-height:100%;
width:100%;
border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
-ms-border-radius:3px;
-webkit-border-radius:3px;
-khtm-border-radius:3px;
}
</style>
<div style="position:absolute;top:-200%;"></div>
<script>
cmd=
{
question:['camera','gallery'],
answer:['You selected camera','You selected gallery'],
doScript:['',''],
TypeChar:'> ',
error:'nothing found!',
id:document.getElementById('code_THIS'),
numCharMoisrex:-1,
startAll:function(){this.id.focus();this.id.value=this.TypeChar;},
check:function()
{
if(new RegExp(this.value,'g').test(this.id.value)==false)this.startAll();
Q=this.id.value.substring(this.id.value.lastIndexOf(this.TypeChar)+this.TypeChar.length,this.id.value.length);
d=0;
if(new RegExp(this.TypeChar,'').test(this.id.value.substring(this.id.value.lastIndexOf('\n\n')|| 0,this.id.value.length))==true){for(i=0;i<this.question.length;i++)
{
if(new RegExp(unescape(this.question[i])+'\n','i').test(Q)==true)
{
this.id.value+=unescape(this.answer[i]);
var doscript=unescape(this.doScript[i]);
eval(doscript);
this.id.value+='\n\n'+this.TypeChar;
d=1;
}
}
if(new RegExp('help\n','').test(Q)==true && d==0)
{
for(i=0;i<this.question.length;i++)
this.id.value+=unescape(this.question[i])+'\n';
this.id.value+='\nThis Designed By Sir\n\n'+this.TypeChar;
}
else if(new RegExp('\n','').test(Q)==true && d==0)
{
this.id.value+=this.error+'\n\n'+this.TypeChar;
}
}
else this.id.value+='\n\n'+this.TypeChar;
},about:'Designed By Sir'
};cmd.startAll();
</script>
</body>
</html>