
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
function findPosX(obj)
{var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent)
break;obj=obj.offsetParent;}}else if(obj.x)
curleft+=obj.x;return curleft;}
function findPosY(obj)
{var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}}else if(obj.y)
curtop+=obj.y;return curtop;}
var Cookie={get:function(name)
{if(document.cookie.length>0){c_start=document.cookie.indexOf(name+'=');if(c_start!=-1){c_start=c_start+name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)
c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return null;},set:function(name,value,days,path,domain,secure)
{var expires=null;if(days){var exdate=new Date();exdate.setDate(exdate.getDate()+days);expires='expires='+exdate.toGMTString();}
document.cookie=name+"="+escape(value)
+(expires?';'+expires:'')
+(path?';path='+path:'')
+(domain?';domain='+domain:'')
+(secure?';secure':'');},drop:function(name,path,domain)
{if(this.get(name)){document.cookie=name+"="
+(path?";path="+path:'')
+(domain?";domain="+domain:'')
+';expires=Thu, 01-Jan-70 00:00:01 GMT';}}};Object.extend(Form.Element.Methods,{copyToClipboard:function(element,swf)
{swf='http://dev.pravda.local/intheair/public_html/rabkor/src/user/www/js/clipboard.swf';if(window.clipboardData)
window.clipboardData.setData('Text',element.getValue());else{if(!$('flash_clipboard_container'))
$(document.body).insert(new Element('div',{id:'flash_clipboard_container'}));var flashId='flashId-HKxmj5';var clipboardSWF='http://appengine.bravo9.com/copy-into-clipboard/clipboard.swf';if(!document.getElementById(flashId)){var div=document.createElement('div');div.id=flashId;document.body.appendChild(div);}
document.getElementById(flashId).innerHTML='';var content='<embed src="'+
clipboardSWF+'" FlashVars="clipboard='+encodeURIComponent(element.getValue())+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(flashId).innerHTML=content;}}});Element.addMethods();
