var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<font size="1"><span id="'+theform.toString()+'">'+thelimit+'</span> characters</font>'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
}
}

/*Mouse Alert*/
function MsgBoxchica (textstring) {
alert ('Sorry, Just Only For Member... Please Login or Register. Thank you!')
}
/*Mouse Alert*/

function closeWindow()
{
  // Close the current window
  window.close();
}

 //Start Disable Right Click
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f 4="";8 9(){1(0.a){(4);5 6}}8 7(e){1(0.b||(0.g&&!0.a)){1(e.c==2||e.c==3){(4);5 6}}}1(0.b){0.h(i.j);0.k=7}l{0.m=7;0.d=9}0.d=n o("5 6")',25,25,'document|if|||message|return|false|clickNS|function|clickIE|all|layers|which|oncontextmenu||var|getElementById|captureEvents|Event|MOUSEDOWN|onmousedown|else|onmouseup|new|Function'.split('|'),0,{}))
// End Disable Right Click

function popDemo(N) {
newWindow = window.open(N, 'popD','toolbar=no,menubar=no,resizable=yes,scrollbars=yes,status=no,location=no,width=800,height=800');
}
function popDemosat(N) {
newWindow = window.open(N, 'popD','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width=300,height=200');
}
