function ClientInfo() { var agt=navigator.userAgent.toLowerCase(); var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav4up = (is_nav && (is_major >= 4)); var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) ); var is_nav5 = (is_nav && (is_major == 5)); var is_nav5up = (is_nav && (is_major >= 5)); var is_ie = (agt.indexOf("msie") != -1); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4); var is_opera = (agt.indexOf("opera") != -1); var is_webtv = (agt.indexOf("webtv") != -1); if (is_nav4up) { this.browser = "Netscape";}else if (is_webtv) { this.browser = "Webtv";}else if (is_aol || is_aol3 || is_aol4) { this.browser = "AOL";}else if (is_opera) { this.browser = "Opera";}else if (is_ie3||is_nav3) { this.browser = "Version3Browser";}else if (is_ie4up) { this.browser = "Microsoft Internet Explorer";}else if (is_nav5up) { this.browser = "Netscape";} else { this.browser = agt;}
if( self.screen ) { numbage = screen.pixelDepth
? Math.pow( 2, screen.pixelDepth )
: Math.pow( 2, screen.colorDepth )
}
else { numbage = 0 }
sCD=numbage; sAg=navigator.userAgent; sB=this.browser; sSH=screen.height; sSW=screen.width; sAV=navigator.appVersion.substring(0,4); sP=navigator.platform; sJ=navigator.javaEnabled(); var now = new Date(); fixDate(now); now.setTime(now.getTime() + 6 * 60 * 1000); var clientInfo = sJ+"|"+sB+"|"+sAV+"|"+sSH+"|"+sSW+"|"+sP+"|"+sCD+"|"+sAg; setCookie("cCLIENT", clientInfo, 0, "/", "", "");}
function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie;}
function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null;} else
begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1)
end = dc.length; return unescape(dc.substring(begin + prefix.length, end));}
function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";}
}
function acceptCookie() { document.cookie = "Enabled=true"; var cookieValid = document.cookie; if (cookieValid.indexOf("Enabled=true") != -1)
{ return true;}
else
{ return false;}
}
function fixDate(date) { var base = new Date(0); var skew = base.getTime(); if (skew > 0)
date.setTime(date.getTime() - skew);}
function imgcode(pic_id, type, quality) { sSH=screen.height; sSW=screen.width; url = "../../_lib/_modules/dispic.php?id=" + pic_id + "&mh=" + sSH + "&mw=" + sSW + "&tnt=" + type + "&q=" + quality; name = pic_id; document.write("<i" + "mg sr" + "c='" + url + "' name='" + name + " alt='" + name + "'>");}
function link(name){ document.location = name;}
function remote2(url){ window.opener.location=url;}
function GenPopUp(url,height,width) { if(height>0) { WH=height;} else { WH=400;}
if(height>0) { WW=width;} else { WW=670;}
eval("page = window.open(url,'','toolbar=0,scrollbars=yes,dependent=yes,location=0,status=no,menubar=0,resizable=0,width=" + WW + ",height=" + WH + ",left = 200,top = 20');");}
function GenPopUpNoBars(url,WH,WW) { eval("page = window.open(url,'','toolbar=0,scrollbars=no,dependent=yes,location=0,status=no,menubar=0,resizable=0,width=" + WW + ",height=" + WH + ",left = 200,top = 100');");}
function popUp(pic_id) { day = new Date(); id = day.getTime(); sSH=screen.height; sSW=screen.width; url = "/_lib/_modules/picpopup.php?pid=" + pic_id + "&mh=" + sSH + "&mw=" + sSW; sSH=screen.height; sSW=screen.width; eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=no,dependent=yes,location=0,status=no,menubar=0,resizable=0,width=300,height=300,left = 200,top = 20');");}
function popUpActionInfo(action,receiverid) { day = new Date(); id = day.getTime(); sWW=300; sWH=150; sSH=screen.height/2 - sWH/2; sSW=screen.width/2 - sWW/2; para1=sSW; para2=sSH; sPW=window.location; url = "/_lib/_modules/popupstatus.php?act=" + action + "&receiverid=" + receiverid + "&pw=" + sPW; eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=no,dependent=yes,location=0,status=no,menubar=0,resizable=0,width=' + sWW + ',height=' + sWH + ',left =' + sSW + ',top = ' + sSH );");}
function popUpG(pic_id) { day = new Date(); id = day.getTime(); sSH=screen.height; sSW=screen.width; sPW=window.location; url = "/_lib/_modules/picpopupg.php?pid=" + pic_id + "&mh=" + sSH + "&mw=" + sSW + "&pw=" + sPW; sSH=screen.height; sSW=screen.width; eval("page" + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=no,dependent=yes,location=0,status=0,menubar=0,resizable=0,width=20,height=20,left = 200,top = 10');"); "page" + ".creator=self";}
function printWindow(){ browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}

function verify() { var argv = verify.arguments; var argc = argv.length; if(argc==0) { txt='Are you certain that you want to do that?';} else { txt=argv[0];}
if (confirm(txt)) { return true;} else { return false;}
}
function replaceButtonText(buttonId, text)
{ if (document.getElementById)
{ var button=document.getElementById(buttonId); if (button)
{ if (button.childNodes[0])
{ button.childNodes[0].nodeValue=text;}
else if (button.value)
{ button.value=text;}
else
{ button.innerHTML=text;}
}
}
}
function calcchar(max_char){ var inp = document.forms['charcntform'].msgbox.value; var l = parseInt(inp.length)
if (l > max_char){ alert("You reached the maximum number of " + max_char + " characters !!!!")
inp = inp.substr(0,max_char)
document.forms['charcntform'].msgbox.value = inp
return;}
document.forms['charcntform'].charcounter.value=max_char-inp.length;}
function selectAll(textareaname) { var txtBuffer=eval("document."+textareaname)
txtBuffer.focus()
txtBuffer.select()
if (document.all){ var selText=txtBuffer.createTextRange()
selText.execCommand("Copy")
alert("This code has been copied to your clipboard.\nOpen your favorite editor and paste it in.\nIt\'s as simple as that.");}
}
function checkMailSendLimit(allowed,sentalready,msg) { if(sentalready>=allowed) { if(allowed == 0) { return true;}
alert (msg); return false;} else { return true;}
}
function trim(str) { return str.replace(/^\s*|\s*$/g,"");}
function timeoutwarner(iTimeOut,msg) { iTimerID = setTimeout("window.focus();alert('" + msg + "')", iTimeOut );}
function hov(loc,cls){
   if(loc.className)
      loc.className=cls;}
function popUpBlog(rep_id) { 
day = new Date(); 
id = day.getTime(); 
sSH=screen.height; 
sSW=screen.width; 
url = "/_lib/_modules/popupblog.php?repid=" + rep_id; 
eval("page" + " = window.open(url, '" + id + "','location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width=20,height=20,left = 200,top = 10');"); 
"page" + ".creator=self";
}
