function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
function GetCookie (name) {
var CookieFound = false;
var start = 0;
var end = 0;
var CookieString = document.cookie;
var i = 0;

while (i <= CookieString.length) {
start = i ;
end = start + name.length;
if (CookieString.substring(start, end) == name){
CookieFound = true;
break; 
}
i++;
}

if (CookieFound){
start = end + 1;
end = CookieString.indexOf(";",start);
if (end < start)
end = CookieString.length;
return unescape(CookieString.substring(start, end));
}
return "";
}

function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
function fopenScript(url, width, height,condition){var Win = window.open(url,"fopenScript",'width=' + width + ',height=' + height + ','+condition);}


function chkdiv(divid){
	var chkid=document.getElementById(divid);
	if(chkid != null){return true; }
	else {return false; }
}

function getpara(){
	var str,pos,parastr
	str = window.location.href;
	pos = str.indexOf("?");
	parastr = str.substring(pos+1);
	return parastr;
}
function getaddforumpara(){
	var str,pos,parastr
	str = window.location.href;
	pos = str.indexOf("=");
	parastr = str.substring(pos+1);
	document.addtopicForm.boardid.value=parastr;
	document.addtopicForm.oldurl.value=document.referrer; 
}
function getaddreplypara(){
	var str,pos,parastr
	str = window.location.href;
	pos = str.indexOf("=");
	parastr = str.substring(pos+1);
	document.addreplyForm.rootid.value=parastr;
	document.addreplyForm.oldurl.value=document.referrer; 
    document.addreplyForm.title.value="Re:"+document.getElementById('kyforum_topictitle').innerHTML; 
}
function geteditreplypara(){
	var str,pos,parastr
	str = window.location.href;
	pos = str.indexOf("=");
	parastr = str.substring(pos+1);
	document.editreplyForm.rootid.value=parastr;
	document.editreplyForm.oldurl.value=document.referrer; 
    document.editreplyForm.title.value=document.getElementById('kyforum_topictitle').innerHTML; 
	document.editreplyForm.FCKeditor1.value=document.getElementById('kyforum_topiccontent').innerHTML; 
}
function mycheckit(a) 
{
document.thisForm.vaction.value=a;
document.thisForm.submit();
}

function ValidNum(obj)
{ 
  var tt;
  tt=event.keyCode; 
  if ((tt<48 || tt>57)&&(tt<96 || tt>105)&& tt!=32 && tt!=8 && tt!="")
  {
   alert("Only Numeric!");
   obj.value = obj.value.replace(/\D/g,'');
   return false;
  }
    
}
