REQUEST_URL = "http://www.rentnow.my/"; REQUEST_URL_SSL = "https://www.rentnow.my/"; REQUEST_URL_NO_SSL = "http://www.rentnow.my/"; BASE_URL = "http://www.rentnow.my/"; BASE_URL_SSL = "https://www.rentnow.my/"; BASE_URL_NO_SSL = "http://www.rentnow.my/"; FRAMEWORK_URL = "http://develop3.dmni.com/framework/"; FRAMEWORK_URL_SSL = "https://develop3.dmni.com/framework/"; FRAMEWORK_URL_NO_SSL = "http://develop3.dmni.com/framework/"; MIN_PICKLIST_OPTIONS = "50"; PRINT_HEADER_FOOTER = {"en":{"header":"","footer":""},"AE":{"header":"","footer":""},"ru":{"header":"","footer":""},"FA":{"header":"","footer":""},"cn":{"header":"","footer":""},"de":{"header":"","footer":""},"it":{"header":"","footer":""},"fr":{"header":"","footer":""}}; /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 0.12.2 */ if(typeof YAHOO=="undefined"){var YAHOO={};} YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i< />-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;} if(propertyCache[property]){return propertyCache[property];} while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());} propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];} return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}} return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};} if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}} break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};} YAHOO.util.Dom={get:function(el){if(!el){return null;} if(typeof el!='string'&&!(el instanceof Array)){return el;} if(typeof el=='string'){return document.getElementById(el);} else{var collection=[];for(var i=0,len=el.length;i=this.left&®ion.right<=this.right&®ion.top>=this.top&®ion.bottom<=this.bottom);};yahoo.util.region.prototype.getarea=function(){return((this.bottom-this.top)*(this.right-this.left));};yahoo.util.region.prototype.intersect=function(region){var t="Math.max(this.top,region.top);var" r="Math.min(this.right,region.right);var" b="Math.min(this.bottom,region.bottom);var" l="Math.max(this.left,region.left);if(b">=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];} this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region(); YD = YAHOO.util.Dom; // $Id: cool_selector.js,v 1.5 2006/06/13 12:24:13 a Exp $ function replace_select_by_cool( select_obj) { var top_table = document.createElement( "table"); top_table.id = select_obj.id; var tr = document.createElement( "tr"); tr.className = "cool_selector"; top_table.appendChild( tr); var td1 = document.createElement( "td"); td1.style.width = document.all?"":"100%"; tr.appendChild( td1); var td2 = document.createElement( "td"); tr.appendChild( td2); td1.innerHTML = "
\
\
\
\
\
"; td2.innerHTML = "
"; td2.className = "button_box"; select_obj.parentNode.replaceChild( top_table, select_obj); if ( top_table.outerHTML ) { top_table.outerHTML = top_table.outerHTML; } var o1 = select_obj; var o2 = document.getElementById( top_table.id); if ( top_table.outerHTML ) { o2._input_ = o2.firstChild.firstChild.firstChild.firstChild; o2._input_hidden_ = o2._input_.nextSibling; o2._list_div_ = o2.firstChild.firstChild.firstChild.lastChild; } else { o2._input_ = o2.firstChild.firstChild.firstChild; o2._input_hidden_ = o2._input_.nextSibling; o2._list_div_ = o2.firstChild.firstChild.lastChild; } o2.selectedIndex = o1.selectedIndex; o2.options = o1.options; o2.className = o1.className; o2.style.cssText = o1.style.cssText o2.style.borderCollapse = "collapse"; o2._input_.className = o1.className; o2._input_.style.cssText = o1.style.cssText + ";width:100%"; o2._list_table_ = o2.getElementsByTagName( "table"); o2._list_table_ = o2._list_table_[0]; if ( document.all ) { o2._list_div_.style.width = o2.clientWidth; } else { o2._list_div_.style.minWidth = o2.clientWidth; } o2._list_rest_ = function() { for( var i=0; i< onloadfuncs.length;="" i++)="" {="" onloadfuncs[i]();="" }="" }="" document.all?window.attachevent(="" "onload",="" onloadhandler):window.addeventlistener(="" "load",="" onloadhandler,="" false);="" $id:="" util_main.js,v="" 1.33="" 2008/09/18="" 16:28:32="" dmitry="" exp="" $="" date_format="1;" temp__="function()" {="" var="" reg1="new" regexp(="" /><|>|&)", "g"); var reg2 = new RegExp( "(\|"|'|<|>|&)", "g"); var reg3 = new RegExp( "(\\\\|\"|'|\\n|\\r)", "g"); var reg4 = new RegExp( "(\\\\\\\\|\\\\\"|\\\\\'|\\\\n|\\\\r)", "g"); var foo1 = function( str, p1) { return map1[p1]; } var foo2 = function( str, p1) { return map2[p1]; } var foo3 = function( str, p1) { return map3[p1]; } var foo4 = function( str, p1) { return map4[p1]; } var map1 = { "\\":"\", '"':""", "'":"'", "<":"<", "="">":">", "&":"&"} var map2 = { "\":"\\", """:'"', "'":"'", "<":"<", ">":"="">", "&":"&"} var map3 = { "\\":"\\\\", "\"":"\\\"", "\'":"\\\'", "\n":"\\n", "\r":"\\r"}; var map4 = { "\\\\":"\\", "\\\"":"\"", "\\\'":"\'", "\\n":"\n", "\\r":"\r"}; htmlEncode = function( str){ return str.replace( reg1, foo1); } htmlDecode = function( str){ return str.replace( reg2, foo2); } addSlashes = function( str){ return str.replace( reg3, foo3); } stripSlashes = function( str){ return str.replace( reg4, foo4); } } temp__(); crc32Class = function( seed, precondition){ this.precondition = precondition || 0xFFFFFFFF; this.seed = seed || 0xEDB88320; this.bitAND = function( num1, num2){ var num11 = num1 >>> 16;var num10 = (num1 < 16)="" />>> 16; var num21 = num2 >>> 16;var num20 = (num2 < 16)="" />>> 16; return (num10 & num20)+(num11 & num21)*0x10000; } this.bitOR = function( num1, num2){ var num11 = num1 >>> 16;var num10 = (num1 < 16)="" />>> 16; var num21 = num2 >>> 16;var num20 = (num2 < 16)="" />>> 16; return (num10 | num20)+(num11 | num21)*0x10000; } this.bitXOR = function( num1, num2){ var num11 = num1 >>> 16;var num10 = (num1 < 16)="" />>> 16; var num21 = num2 >>> 16;var num20 = (num2 < 16)="" />>> 16; return (num10 ^ num20)+(num11 ^ num21)*0x10000; } this.bitLeft = function( num, n){ var num1 = num >>> 16;var num0 = (num < 16)="" />>> 16; return (num0 >>> n) + (num1 >>> n)*0x10000 + this.bitAND( (num1 < 16-n),="" 0x0000ffff);="" }="" this.bitleftcicle="function(" num,="" n){="" var="" num1="num" />>> 16;var num0 = (num < 16)="" />>> 16; return ( (num0 >>> n) + this.bitAND( (num1 < 16-n),="" 0x0000ffff))="" +="" ((num1="" />>> n) + this.bitAND( (num0 < 16-n),="" 0x0000ffff)="" )*0x10000;="" }="" this.crc32_table="[];" var="" l_crc32;="" var="" l_temp_crc32;="" for(="" var="" i_bytes="0;" /><256; i_bytes++)="" {="" l_crc32="i_bytes;" for(="" var="" i_bits="0;"><8; i_bits++)="" {="" l_temp_crc32="l_crc32">>> 1; l_crc32 = ( this.bitAND( l_crc32, 0x1) != 0 )?this.bitXOR( l_temp_crc32, this.seed):l_temp_crc32; } this.crc32_table[i_bytes] = l_crc32; } this.get = function( str) { var crc32 = this.precondition; for( var i=0; i arguments[3] ) { arguments[0].value = arguments[0].value.substring( 0, arguments[3]); len = arguments[3]; } document.getElementById(arguments[1]).innerHTML = len; document.getElementById(arguments[2]).innerHTML = arguments[3] - len; } function wr( str) { window.document.write( str); } function changeImageSrc( name, src) { window.document.images[name].src = src; } function preload_images( data) { var PreloadImages = []; for( var i; i'); Preview_.showMe(); } function openLegalNotice() { open_popup_by_url( translates["Legal Notice"], "./legal_notice.html"); } function openLegalNotice2() { open_popup_by_url( translates["Legal Notice"], "http://www.alpeng.com/legal_notice.html"); } function openPrivacy() { open_popup_by_url( translates["Privacy Policy"], "./privacy_policy.html"); } function openPrivacy2() { open_popup_by_url( translates["Privacy Policy"], "http://www.alpeng.com/privacy_policy.html"); } function openLanguageSelect() { open_popup_by_url(translates["Language Select"], "./language_select.html"); } function save_article( page_title, art_url) { open_popup_by_url( translates["Save article"] || "Save article", "./save_article.html?page_title="+myEscape( page_title)+"&url="+myEscape( art_url)); if ( typeof( onSaveArticlePing) == "string" ) { var ping_img = new Image(); ping_img.src = onSaveArticlePing; } } function email_to_friend( page_title, art_url) { open_popup_by_url( translates["E-mail To a Friend"] || "E-mail To a Friend", "./email_to_friend.html?page_title="+myEscape( page_title)+"&url="+myEscape( art_url)); if ( typeof( onEmailArticlePing) == "string" ) { var ping_img = new Image(); ping_img.src = onEmailArticlePing; } } function email_alert( table, table_id, page_title, art_url) { open_popup_by_url( translates["Email Alert"] || "Email Alert", "./email_alert.html?page_title="+myEscape( page_title)+"&url="+myEscape( art_url)+"&table="+myEscape( table)+"&table_id="+myEscape( table_id)); } function windowScroll() { try { var divs = window.document.getElementById( "forLayers").getElementsByTagName("DIV"); for( var i=0; iRealPlayer is absent, for download click here'); } } else if ( type == 1 ) { FLvideoWindow( url, width, height); } else if ( type == 2 ) { if ( havemp ) { MPvideoWindow( url, width, height); } else { wr( ''); } } else if ( type == 3 ) { if ( haveqt ){ QTvideoWindow( url, width, height); } else { wr( ''); } } else if ( type == 4 ) { wr( ''); } } function RPvideoWindow( url, width, height) { wr('\ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ '); } function QTvideoWindow( url, width, height) { wr('\ \ \ \ \ \ \ '); } function MPvideoWindow( url, width, height) { wr('\ \ \ \ \ \ \ \ '); } function FLvideoWindow( url, width, height) { wr('\ \ \ \ \ \ '); } function openIntro() { addLayer( "Intro"); Intro_ = new PopLayer( "Intro", translates["Introduction"], "intro.html"); // Intro_.width = 650; // Intro_.height = 400; Intro_.showMe(); } function open_popup_by_url( title, url, width, height, forceSize, scrolling ) { var name = "Popup_"+crc32.getHex( title); addLayer( name); eval( name+"_= new PopLayer( name, title, url);var o="+name+"_;"); o.width = width || 800; o.height = height || 500; o.forceSize = forceSize || 0; o.scrolling = scrolling || "auto"; if( o.forceSize ) { o.initWidth = o.width; o.initHeight = o.height; } o.showMe(); } function open_popup_empty( title, iframe_name, width, height) { var name = "Popup_"+crc32.getHex( title); addLayer( name); eval( name+"_= new PopLayer( name, title, './empty.php');var o="+name+"_;"); o.width = width || 650; o.height = height || 500; o.iframe_name = iframe_name; o.showMe(); } function open_popup( title, content, width, height, bgcolor, div_style) { var name = "Popup_"+crc32.getHex( title); var div = addLayer( name); eval( name+"_= new PopLayer2( name, title, content);var o="+name+"_;"); o.width = width || 0; o.height = height || 0; o.div_style = div_style || ""; o.bgcolor = bgcolor || "#FFFFFF"; o.showMe(); return o; } function openGlossaryLayer( title, description) { open_popup( title, "
"+description+"
", 300, 0, "#FFFEA6"); } function popup_close() { if ( typeof( window.popup_close_) == "function" ) { window.popup_close_(); } else { setTimeout( "popup_close()", 100); } } function viewO( o) { for ( var i in o) { alert( i + " = " + o[i]); } } function viewOstr( o, deep, sp, ignore_func, ignore_prop) { var deep = typeof( deep)=="undefined"?2:deep; var ignore_prop = typeof( deep)=="undefined"?{}:{"mod":1, "param_":1, "gVars":1, "default_param":1, "attr_map":1, "form":1}; if ( deep < 1="" )="" return="" o;="" var="" sp="sp" ||="" "";="" var="" ignore_func="typeof(" ignore_func)="=" undefined"?true:ignore_func;"="" if="" (="" sp="=" ""="" )="" {="" var="" res="[" "\nobject="" information:\n"];="" }="" else="" {="" var="" res="[];" }="" for="" (="" var="" i="" in="" o)="" {="" if="" (="" (ignore_func="" &&="" typeof(="" o[i])="=" "function")="" ||="" ignore_prop[i]="" )="" {="" continue;="" }="" if="" (="" typeof(="" o[i])="=" "object"="" )="" {="" res.push(="" sp,="" i,="" "="\n" ,"="" viewostr(="" o[i],="" deep-1,="" sp+"="" ",="" ignore_func,="" ignore_prop),="" "\n");="" }="" else="" {="" res.push(="" sp,="" i,="" "=", o[i], " \n");="" }="" }="" return="" res.join(="" "");="" }="" function="" sh(="" id,="" mode)="" {="" var="" o="window.document.getElementById(" id);="" if="" (="" o="=" null="" )="" return;="" o.style.display="(" mode="" )?"":"none";="" }="" function="" sv(="" form,="" name,="" value)="" {="" ctrl_by_name[form+"."+name]._setvalue(="" value);="" }="" function="" gv(="" form,="" name)="" {="" return="" ctrl_by_name[form+"."+name]._getvalue();="" }="" function="" validate_form(="" name,="" message)="" {="" var="" er_num="0;" for(="" var="" i="0;" /> 5 ) return " .............\n"; if ( typeof( data) == 'function') { return ""; } if ( typeof( data.toString) == 'string' && typeof( data) != 'number') { return "\"" + data + "\"\n"; } if ( typeof( del) == "undefined" ) { del = "\t"; result = typeof( data) + ":\n"; } if ( typeof( data) == 'object') { for( i in data) { if ( typeof( data[i]) == 'function') { continue; } result += "\n" + del+((typeof(i)=="string" && parseInt(i)!=i)?('"'+i+'"'):i) + " (" + typeof(data[i]) + "): " + varDump( data[i], del+"\t", level+1); } } return result==""?data:result; } catch( t) { }; } function Dprint( data){ if ( typeof( data) == "string" ) { windebug.document.f.debug.value += data; } else { windebug.document.f.debug.value += varDump( data); } } function myEscape( str) { return escape( str.toString()).replace( /\//g, "%2F").replace( /\\/g, "%5C").replace( /\+/g, "%2B"); } function setTrBg( o, color) { o.style.background = color; } function addToArray( arr, data) { var pos = -1; for( var i=0; i= len || ch.length == 0) { return str; } how = how || 0; if ( how == 0 ) { while( str.length < len="" )="" {="" str="" +="ch;" }="" str="str.substr(" 0,="" len);="" }="" else="" if="" (="" how="=" 1="" )="" {="" while(="" str.length="" />< len="" )="" {="" str="ch+str;" }="" str="str.substr(" 0,="" len);="" }="" return="" str;="" }="" function="" datetotimestamp(="" date)="" {="" var="" d="date.split(" ^0-9]+/);="" if="" (="" d="=" null="" ||="" d.length="" />< 3="" )="" {="" if="" (="" date.length="=" 0="" )="" {="" return="" "";="" }="" else="" {="" return="" "_incorect_format_";="" }="" }="" else="" {="" if="" (="" date_format="" )="" {="" var="" d_="pad(" d[2],="" "0",="" 4,="" 1)+"-"+pad(="" d[0],="" "0",="" 2,="" 1)+"-"+pad(="" d[1],="" "0",="" 2,="" 1);="" if="" (="" validdate(="" d_)="" )="" {="" return="" d_;="" }="" else="" {="" return="" "_incorect_format_";="" }="" }="" else="" {="" var="" d_="pad(" d[2],="" "0",="" 4,="" 1)+"-"+pad(="" d[1],="" "0",="" 2,="" 1)+"-"+pad(="" d[0],="" "0",="" 2,="" 1);="" if="" (="" validdate(="" d_)="" )="" {="" return="" d_;="" }="" else="" {="" return="" "_incorect_format_";="" }="" }="" }="" }="" function="" timestamptodate(="" date)="" {="" var="" d="date.match(" [0-9]{4})[^0-9]*([0-9]{2})[^0-9]*([0-9]{2})/);="" if="" (="" d="=" null="" ||="" d.length="" />< 4="" ||="" (="" d[1]="=" 0000""="" &&="" d[2]="=" 00""="" &&="" d[3]="=" 00""="" )="" )="" {="" return="" "";="" }="" else="" {="" if="" (="" date_format="" )="" {="" return="" d[2]+"/"+d[3]+"/"+d[1];="" }="" else="" {="" return="" d[3]+"/"+d[1]+"/"+d[1];="" }="" }="" }="" function="" validdateformated(="" date,="" format)="" {="" var="" format="format" ||="" "mm/dd/yyyy";="" var="" date_res="" ;="" var="" pos1="format.indexOf(" 'yyyy');="" date_res="" +="pos1!=-1?date.substr(" pos1,="" 4):"0000";="" pos1="format.indexOf(" 'mm');="" date_res="" +="pos1!=-1?date.substr(" pos1,="" 3):"00";="" pos1="format.indexOf(" 'dd');="" date_res="" +="pos1!=-1?date.substr(" pos1,="" 3):"00";="" date_res="" +="000000" ;="" return="" validdate(="" date_res);="" }="" function="" validdate(="" date)="" {="" var="" m_day="{1:31," 2:28,="" 3:31,="" 4:30,="" 5:31,="" 6:30,="" 7:31,="" 8:31,="" 9:30,="" 10:31,="" 11:30,="" 12:31};="" var="" date="date.split(" ^0-9]+/);="" if="" (="" date.length="=" 1="" )="" {="" date="date[0];" var="" y="(" date.substr(="" 0,="" 4))-0;="" var="" m="(" date.substr(="" 4,="" 2))-0;="" var="" d="(" date.substr(="" 6,="" 2))-0;="" var="" h="(" date.substr(="" 8,="" 2))-0;="" var="" m_="(" date.substr(="" 10,="" 2))-0;="" var="" s="(" date.substr(="" 12,="" 2))-0;="" }="" else="" {="" var="" y="(" date[0]="" ||="" 0)-0;="" var="" m="(" date[1]="" ||="" 0)-0;="" var="" d="(" date[2]="" ||="" 0)-0;="" var="" h="(" date[3]="" ||="" 0)-0;="" var="" m_="(" date[4]="" ||="" 0)-0;="" var="" s="(" date[5]="" ||="" 0)-0;="" }="" if="" (="" !(y="" &&="" m="" &&="" d)="" )="" {="" return="" false;="" }="" if="" (="" y="" />< 1="" )="" {="" return="" false;="" }="" if="" (="" m="" />< 1="" ||="" m="" /> 12 ) { return false; } if ( m != 2 ) { if ( d < 1="" ||="" d="" /> m_day[m] ) { return false; } } else { if ( y%4 != 0) { var days = 28; } else if ( y%400 == 0 ) { var days = 29; } else if ( y%100 == 0 ) { var days = 28; } else { var days = 29; } if ( d < 1="" ||="" d="" /> days) { return false; } } if ( h < 0="" ||="" h="" /> 23 ) { return false; } if ( m_ < 0="" ||="" m_="" /> 60 ) { return false; } if ( s < 0="" ||="" s="" /> 60 ) { return false; } return true; } function isDisplayed( id) { var isIE=document.all; var topDog=isIE ? "BODY" : "HTML"; var hotDog=window.document.getElementById( id); while( hotDog.style.display!="none" && hotDog.tagName!=topDog) hotDog=isIE?hotDog.parentElement:hotDog.parentNode; return hotDog.style.display=="none"?false:true; } function insertAtCursor( myField, myValue) { if ( document.selection ) { myField.focus(); var sel = document.selection.createRange(); sel.text = myValue; } else if ( myField.selectionStart || myField.selectionStart == '0' ) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); } else { myField.value += myValue; } } function roundFloat( f, n) { d = Math.pow( 10, n); return Math.round( f*d)/d; } function getHumanFileSize( size) { if ( size > 1024*1024 ) { size = roundFloat( size/(1024*1024), 3) + "MByte"; } else if ( size > 1024 ) { size = roundFloat( size/(1024), 3) + "KByte"; } else { size = roundFloat( size, 0) + "Byte"; } return size; } function numberFormat( number, len) { var str = ""+number; while( str.length < len="" )="" str="0" +str;="" return="" str;="" }="" function="" gettime(="" now)="" {="" var="" h="now.getHours();" if="" (="" h="" /> 12 ) { var ampm = "pm"; h -= 12; } else { var ampm = "am"; } return numberFormat( h, 2)+":"+numberFormat( now.getMinutes(), 2)+":"+numberFormat( now.getSeconds(), 2)+" "+ampm; } function getTime2( time) { h = numberFormat( time.getUTCHours(), 2); m = numberFormat( time.getUTCMinutes(), 2); s = numberFormat( time.getUTCSeconds(), 2); return h+":"+m+":"+s; } function getPrintForm( print_group_id) { var o = window.document.getElementById( print_group_id); return htmlToPrintable( o.innerHTML); } function print_page_by_object( o) { var styles = document.getElementsByTagName( "style"); if ( o != null ) { if ( typeof( onPrintArticlePing) == "string" ) { var ping_img = new Image(); ping_img.src = onPrintArticlePing; } var popup_ = window.open("","print",'scrollbars=1,width=600,height=500'); if ( popup_.document && popup_.document.body ) popup_.document.body.innerHTML = ""; popup_.document.write( ["\ \ \ \ Print\ \ \ \ \
\ \ \ \ \
", htmlToPrintable( o.innerHTML), "
\
\ \ "].join( "") ); for( var i=0; i"); } popup_.document.close(); popup_.print(); popup_.close(); } } function print_page( id) { var styles = document.getElementsByTagName( "style"); var o = window.document.getElementById( id); if ( o != null ) { if ( typeof( onPrintArticlePing) == "string" ) { var ping_img = new Image(); ping_img.src = onPrintArticlePing; } var popup_ = window.open("","print",'scrollbars=1,width=600,height=500'); if ( popup_.document && popup_.document.body ) popup_.document.body.innerHTML = ""; popup_.document.write( ["\ \ \ \ Print\ \ \ \ \
\ \ \ \ \
", PRINT_HEADER_FOOTER[current_language]["header"], htmlToPrintable( o.innerHTML), PRINT_HEADER_FOOTER[current_language]["footer"], "
\
\ \ "].join( "") ); for( var i=0; i"); } popup_.document.close(); popup_.print(); popup_.close(); } } function htmlToPrintable( data) { var res = data.match( /(\<(input|textarea|select)[^\>]*\>)/gi); if ( res != null ) { for( var i=0; i<\s*([^\s\>]+)/i); var tag = ( res2 == null )?"undef":res2[1].toLowerCase(); var res2 = res[i].match( /type=(?:[\'\"]([^\'\"]*)[\'\"]|(\w*))[\s\>]/i); var type = ( res2 == null )?"text":(res2[1] || res2[2]).toLowerCase(); var res2 = res[i].match( /id=(?:[\'\"]([^\'\"]*)[\'\"]|(\w*))[\s\>]/i); var id = ( res2 == null )?"":(res2[1] || res2[2]); var res2 = res[i].match( /style=(?:[\'\"]([^\'\"]*)[\'\"]|(\w*))[\s\>]/i); var style = ( res2 == null )?"":(res2[1] || res2[2]); var o = window.document.getElementById( id); if ( o != null ) { if ( o.style.display && o.style.display=="none") { data = data.replace( res[i], ""); } if ( tag == "input" ) { if ( type == "checkbox" || type == "radio" ) { data = data.replace( res[i], [""].join( "")); } else if ( type=="password" ){ data = data.replace( res[i], ["********"].join( "")); } else if ( type=="hidden" ){ data = data.replace( res[i], ""); } else { data = data.replace( res[i], ["", o.value, ""].join( "")); } } else if ( tag == "textarea") { data = data.replace( res[i], [""].join( "")); } else if ( tag == "select" ) { var opt = o.options; if ( opt != "null" ) { var r = []; for( var z=0; z", r.join( ", "),""].join( "")); } } } } data = data.replace( /\]*\>[^\< /><\ ption\s*\="">|\<\ elect\s*\="">/gi, ""); data = data.replace( /\<\ extarea\s*\="">/ig, "\"); var prev_data = data.concat( "!"); while( prev_data.length > data.length ) { prev_data = data; data = data.replace( /(\< /><]*)(id|onchange|onclick|onfocus|onblur|onmouseover|onmouseout)=("[^"]*"|'[^']*'|\w+)[\n\t\s]* i,="" "$1");="" }="" var="" prev_data="data.concat(" "!");="" while(="" prev_data.length=""> data.length ) { prev_data = data; data = data.replace( /(\<(\w+(=(\"[^\"]+\"|\'[^\']+\'|\w+))?[\n\t\s\>]+)+)\w+=(\"\"|\'\')[\n\t\s]*/g, "$1"); } } data = data.replace( "><", "=""> <") +="" "="" ";="" var="" d="data.split(">]*\>|\<\ c[r]ipt\="">/i); if ( d.length > 1 ) { var res = []; for( var i=0; i< d.length;="" i++)="" {="" if="" (="" i%2="=" 0="" )="" {="" res.push(="" d[i]);="" }="" }="" return="" res.join(="" "");="" }="" else="" {="" return="" data;="" }="" }="" $id:="" detect.js,v="" 1.3="" 2007/10/08="" 09:09:48="" a="" exp="" $="" browserinfodetector="function()" {="" var="" nse="" ;="" var="" detectie="function(class_id)" {="" browserinfodetector.result="false;" />\n on error resume next \n browserInfoDetector.result = IsObject(CreateObject("' + class_id + '")) \n \n'); return browserInfoDetector.result; } var detectNS = function(class_id) { var t = nse.indexOf(class_id) != -1 && navigator.mimeTypes[class_id].enabledPlugin != null; return t; } browserInfoDetector.info.screen = screen.width+"x"+screen.height; browserInfoDetector.info.cdi = screen.colorDepth || screen.pixelDepth; browserInfoDetector.info.java = navigator.javaEnabled(); browserInfoDetector.info.nav = navigator.appName.toLowerCase(); browserInfoDetector.info.agt = navigator.userAgent.toLowerCase(); browserInfoDetector.info.win = ((browserInfoDetector.info.agt.indexOf("win")!=-1) || (browserInfoDetector.info.agt.indexOf("32bit")!=-1)); browserInfoDetector.info.mac = (browserInfoDetector.info.agt.indexOf("mac")!=-1); browserInfoDetector.info.ns = (browserInfoDetector.info.nav.indexOf("netscape") != -1); browserInfoDetector.info.opera= (browserInfoDetector.info.nav.indexOf("opera") != -1); browserInfoDetector.info.ie = (browserInfoDetector.info.agt.indexOf("msie") != -1); if ( document.documentElement && document.documentElement.clientWidth ) { browserInfoDetector.info.winsize = document.documentElement.clientWidth + 'x' + document.documentElement.clientHeight; } else if ( document.body && document.body.clientWidth ) { browserInfoDetector.info.winsize = document.body.clientWidth + 'x' + document.body.clientHeight; } else { browserInfoDetector.info.winsize = window.innerWidth + 'x' + window.innerHeight; } if ( browserInfoDetector.info.ie && browserInfoDetector.info.win ) { browserInfoDetector.info.shk = detectIE("SWCtl.SWCtl.1"); browserInfoDetector.info.fla = detectIE("ShockwaveFlash.ShockwaveFlash.1"); if ( browserInfoDetector.info.fla ) { browserInfoDetector.info.fla_version = 0; for( var i=0; i<20; i++)="" {="" if="" (="" detectie("shockwaveflash.shockwaveflash."="" +="" i)="" )="" {="" browserinfodetector.info.fla_version="i;" }="" }="" }="" browserinfodetector.info.rp="detectIE(" rmocx.realplayer"="" g2="" control.1");="" browserinfodetector.info.mov="detectIE(" quicktime.quicktime");"="" browserinfodetector.info.wma="detectIE(" wmplayer.ocx");"="" browserinfodetector.info.pdf="0;" browserinfodetector.info.pdfver='' ;="" if="" (="" detectie("pdf.pdfctrl.1")="" )="" {="" browserinfodetector.info.pdf="1;" browserinfodetector.info.pdfver='4' ;="" }="" if="" (="" detectie('pdf.pdfctrl.5')="" )="" {="" browserinfodetector.info.pdf="1;" browserinfodetector.info.pdfver='5' ;="" }="" if="" (="" detectie('pdf.pdfctrl.6')="" )="" {="" browserinfodetector.info.pdf="1;" browserinfodetector.info.pdfver='6' ;="" }="" if="" (="" detectie('acropdf.pdf.1')="" )="" {="" browserinfodetector.info.pdf="1;" browserinfodetector.info.pdfver='7' ;="" }="" }="" if="" (="" browserinfodetector.info.ns="" ||="" !browserinfodetector.info.win)="" {="" nse="" ;="" for="" (="" var="" i="0;"> and objects (for IE only) */ function showElement( elmID, overDiv ) { elmID = elmID.toLowerCase(); if( document.all && overDiv.offsetLeft != this.UNDEFINED) { var elms = window.document.getElementsByTagName( elmID); for( i = 0; i < elms.length;="" i++="" )="" {="" obj="elms[i];" if(="" !obj="" ||="" !obj.offsetparent="" )="" {="" continue;="" }="" find="" the="" element's="" offsettop="" and="" offsetleft="" relative="" to="" the="" body="" tag.="" objleft="obj.offsetLeft;" objtop="obj.offsetTop;" objparent="obj.offsetParent;" alert(objparent.tagname.touppercase());="" console.debug(objparent);="" while(="" objparent.tagname.touppercase()="" !="BODY" &&="" objparent.tagname.touppercase()="" !="HTML" )="" {="" objleft="" +="objParent.offsetLeft;" objtop="" +="objParent.offsetTop;" objparent="objParent.offsetParent;" }="" objheight="obj.offsetHeight;" objwidth="obj.offsetWidth;" if((="" overdiv.offsetleft="" +="" overdiv.offsetwidth="" )="" /><= objleft="" );="" else="" if((="" overdiv.offsettop="" +="" overdiv.offsetheight="" )=""><= objtop="" );="" else="" if(="" overdiv.offsettop="">= ( objTop + objHeight )); else if( overDiv.offsetLeft >= ( objLeft + objWidth )); else { obj.style.visibility = ""; } } } else { if( ( elmID == "iframe" || elmID == "embed" || elmID == "applet" || elmID == "object") && overDiv.offsetLeft != this.UNDEFINED ) { var elms = window.document.getElementsByTagName( elmID); for( i = 0; i < elms.length;="" i++="" )="" {="" obj="elms[i];" if(="" !obj="" ||="" !obj.parentnode)="" {="" continue;="" }="" find="" the="" element's="" offsettop="" and="" offsetleft="" relative="" to="" the="" body="" tag.="" objleft="obj.offsetLeft;" objtop="obj.offsetTop;" objparent="obj.parentNode;" while(="" objparent.tagname.touppercase()="" !="HTML" )="" {="" if(="" objparent.tagname.touppercase()="=" "tr"="" ||="" objparent.tagname.touppercase()="=" "tbody"="" ||="" objparent.tagname.touppercase()="=" "span")="" {="" objparent="objParent.parentNode;" continue="" }="" objleft="" +="objParent.offsetLeft;" objtop="" +="objParent.offsetTop;" objparent="objParent.parentNode;" }="" objheight="obj.offsetHeight;" objwidth="obj.offsetWidth;" if((="" overdiv.offsetleft="" +="" overdiv.offsetwidth="" )="" /><= objleft="" );="" else="" if((="" overdiv.offsettop="" +="" overdiv.offsetheight="" )=""><= objtop="" );="" else="" if(="" overdiv.offsettop="">= ( objTop + objHeight )); else if( overDiv.offsetLeft >= ( objLeft + objWidth )); else { if ( elmID == "iframe" ) { obj.contentWindow.document.body.style.visibility = ""; } else { obj.style.visibility = ""; } } } } } } // $Id: popcalendar.js,v 1.7 2007/07/05 09:32:56 andy Exp $ // written by Tan Ling Wee on 2 Dec 2001 // last updated 23 June 2002 // email : fuushikaden@yahoo.com var fixedX = -1 // x position (-1 if to appear below control) var fixedY = -1 // y position (-1 if to appear below control) var startAt = 1 // 0 - sunday ; 1 - monday var showWeekNumber = 1 // 0 - don't show; 1 - show var showToday = 1 // 0 - don't show; 1 - show var imgDir = "./framework/js/popupcal/" // directory for images ... e.g. var imgDir="/img/" var gotoString = "Go To Current Month" var todayString = "Today is" var weekString = "Wk" var scrollLeftMessage = "Click to scroll to previous month. Hold mouse button to scroll automatically." var scrollRightMessage = "Click to scroll to next month. Hold mouse button to scroll automatically." var selectMonthMessage = "Click to select a month." var selectYearMessage = "Click to select a year." var selectDateMessage = "Select [date] as date." // do not replace [date], it will be replaced by date. var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected, dateSelected, omonthSelected, oyearSelected, odateSelected, monthConstructed, yearConstructed, intervalID1, intervalID2, timeoutID1, timeoutID2, ctlToPlaceValue, ctlNow, dateFormat, nStartingYear var bPageLoaded=false var ie=document.all var dom=window.document.getElementById var ns4=document.layers var today = new Date() var dateNow = today.getDate() var monthNow = today.getMonth() var yearNow = today.getYear() var imgsrc = new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif") var img = new Array() var bShow = false; function HolidayRec (d, m, y, desc) { this.d = d this.m = m this.y = y this.desc = desc } var HolidaysCounter = 0 var Holidays = new Array() function addHoliday (d, m, y, desc) { Holidays[HolidaysCounter++] = new HolidayRec ( d, m, y, desc ) } if (dom) { for (i=0;i"); } var monthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December") if (startAt==0) { dayName = new Array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat") } else { dayName = new Array ("Mon","Tue","Wed","Thu","Fri","Sat","Sun") } var styleAnchor="text-decoration:none;color:black;" var styleLightBorder="border-style:solid;border-width:1px;border-color:#a0a0a0;" function swapImage(srcImg, destImg){ if (ie) { window.document.getElementById(srcImg).setAttribute("src",imgDir + destImg) } } function popcalInit() { pc_oldkeypress = document.onkeypress; document.onkeypress = function hidecal1 (e) { var event = e ? e : window.event; if (event.keyCode==27) { hideCalendar() } if (typeof pc_oldkeypress == 'function') { pc_oldkeypress() // will work if old handler does not call anything via 'this' } } pc_oldclick = document.onclick; document.onclick = function hidecal2 (e) { var event = e ? e : window.event; if (!bShow) { hideCalendar() } bShow = false if (typeof pc_oldclick == 'function') { pc_oldclick() // will work if old handler does not call anything via 'this' } } if (!ns4) { l = yearNow+''; l = l.length; if ( l != 4 ) { yearNow += 1900 } crossobj=(dom)?window.document.getElementById("calendar").style : ie? document.all.calendar : document.calendar hideCalendar() crossMonthObj=(dom)?window.document.getElementById("selectMonth").style : ie? document.all.selectMonth : document.selectMonth crossYearObj=(dom)?window.document.getElementById("selectYear").style : ie? document.all.selectYear : document.selectYear monthConstructed=false; yearConstructed=false; if (showToday==1) { window.document.getElementById("lblToday").innerHTML = todayString + " "+dayName[(today.getDay()-startAt==-1)?6:(today.getDay()-startAt)]+", " + dateNow + " " + monthName[monthNow].substring(0,3) + " " + yearNow + "" } sHTML1="   " sHTML1+="   " sHTML1+=" " sHTML1+=" " window.document.getElementById("caption").innerHTML = sHTML1 bPageLoaded=true } } function hideCalendar() { if ( crossobj ) { showElement( 'SELECT', window.document.getElementById("calendar")); showElement( 'APPLET', window.document.getElementById("calendar")); showElement( 'EMBED', window.document.getElementById("calendar")); showElement( 'OBJECT', window.document.getElementById("calendar")); crossobj.visibility="hidden" crossobj.top = 0; crossobj.left = 0; if (crossMonthObj != null){crossMonthObj.visibility="hidden"} if (crossYearObj != null){crossYearObj.visibility="hidden"} } } function padZero(num) { return (num < 10)?="" '0'="" +="" num="" :="" num="" ;="" }="" function="" constructdate(d,m,y)="" {="" stmp="dateFormat" stmp="sTmp.replace" />") sTmp = sTmp.replace ("d","") sTmp = sTmp.replace ("",padZero(d)) sTmp = sTmp.replace ("",d) sTmp = sTmp.replace ("mmm","") sTmp = sTmp.replace ("mm","") sTmp = sTmp.replace ("m","") sTmp = sTmp.replace ("",m+1) sTmp = sTmp.replace ("",padZero(m+1)) sTmp = sTmp.replace ("",monthName[m]) return sTmp.replace ("yyyy",y) } function closeCalendar() { var sTmp hideCalendar(); ctlToPlaceValue.value = constructDate(dateSelected,monthSelected,yearSelected) if (flag) make_calc(); } /*** Month Pulldown ***/ function StartDecMonth() { intervalID1=setInterval("decMonth()",80) } function StartIncMonth() { intervalID1=setInterval("incMonth()",80) } function incMonth () { monthSelected++ if (monthSelected>11) { monthSelected=0 yearSelected++ } constructCalendar() } function decMonth () { monthSelected-- if (monthSelected<0) {="" monthselected="11" yearselected--="" }="" constructcalendar()="" }="" function="" constructmonth()="" {="" popdownyear()="" if="" (!monthconstructed)="" {="" shtml="" for="" (i="0;"><12; i++)="" {="" sname="monthName[i];" if="" (i="=monthSelected){" sname="" +="" sname="" +="">" } sHTML += " " + sName + " " } window.document.getElementById("selectMonth").innerHTML = "" + sHTML + "
" monthConstructed=true } } function popUpMonth() { constructMonth() crossMonthObj.visibility = (dom||ie)? "visible" : "show" crossMonthObj.left = parseInt(crossobj.left) + 50 crossMonthObj.top = parseInt(crossobj.top) + 26 hideElement( 'SELECT', window.document.getElementById("selectMonth") ); hideElement( 'APPLET', window.document.getElementById("selectMonth") ); hideElement( 'EMBED', window.document.getElementById("selectMonth") ); hideElement( 'OBJECT', window.document.getElementById("selectMonth") ); } function popDownMonth() { crossMonthObj.visibility= "hidden" } /*** Year Pulldown ***/ function incYear() { for (i=0; i<7; i++){="" newyear="(i+nStartingYear)+1" if="" (newyear="=yearSelected)" {="" txtyear=" " +="" newyear="" +=""> " } else { txtYear = " " + newYear + " " } window.document.getElementById("y"+i).innerHTML = txtYear } nStartingYear ++; bShow=true } function decYear() { for (i=0; i<7; i++){="" newyear="(i+nStartingYear)-1" if="" (newyear="=yearSelected)" {="" txtyear=" " +="" newyear="" +=""> " } else { txtYear = " " + newYear + " " } window.document.getElementById("y"+i).innerHTML = txtYear } nStartingYear --; bShow=true } function selectYear(nYear) { yearSelected=parseInt(nYear+nStartingYear); yearConstructed=false; constructCalendar(); popDownYear(); } function constructYear() { popDownMonth() sHTML = "" if (!yearConstructed) { sHTML = "-" j = 0 nStartingYear = yearSelected-3 for (i=(yearSelected-3); i<=(yearselected+3); i++)="" {="" sname="i;" if="" (i="=yearSelected){" sname="" +="" sname="" +="">" } sHTML += " " + sName + " " j ++; } sHTML += "+" window.document.getElementById("selectYear").innerHTML = "" + sHTML + "
" yearConstructed = true } } function popDownYear() { clearInterval(intervalID1) clearTimeout(timeoutID1) clearInterval(intervalID2) clearTimeout(timeoutID2) crossYearObj.visibility= "hidden" } function popUpYear() { var leftOffset constructYear() crossYearObj.visibility = (dom||ie)? "visible" : "show" leftOffset = parseInt(crossobj.left) + window.document.getElementById("spanYear").offsetLeft if (ie) { leftOffset += 6 } crossYearObj.left = leftOffset crossYearObj.top = parseInt(crossobj.top) + 26 } /*** calendar ***/ function WeekNbr(n) { // Algorithm used: // From Klaus Tondering's Calendar document (The Authority/Guru) // hhtp://www.tondering.dk/claus/calendar.html // a = (14-month) / 12 // y = year + 4800 - a // m = month + 12a - 3 // J = day + (153m + 2) / 5 + 365y + y / 4 - y / 100 + y / 400 - 32045 // d4 = (J + 31741 - (J mod 7)) mod 146097 mod 36524 mod 1461 // L = d4 / 1460 // d1 = ((d4 - L) mod 365) + L // WeekNumber = d1 / 7 + 1 year = n.getFullYear(); month = n.getMonth() + 1; if (startAt == 0) { day = n.getDate() + 1; } else { day = n.getDate(); } a = Math.floor((14-month) / 12); y = year + 4800 - a; m = month + 12 * a - 3; b = Math.floor(y/4) - Math.floor(y/100) + Math.floor(y/400); J = day + Math.floor((153 * m + 2) / 5) + 365 * y + b - 32045; d4 = (((J + 31741 - (J % 7)) % 146097) % 36524) % 1461; L = Math.floor(d4 / 1460); d1 = ((d4 - L) % 365) + L; week = Math.floor(d1/7) + 1; return week; } function constructCalendar () { var aNumDays = Array (31,0,31,30,31,30,31,31,30,31,30,31) var dateMessage var startDate = new Date (yearSelected,monthSelected,1) var endDate if (monthSelected==1) { endDate = new Date (yearSelected,monthSelected+1,1); endDate = new Date (endDate - (24*60*60*1000)); numDaysInMonth = endDate.getDate() } else { numDaysInMonth = aNumDays[monthSelected]; } datePointer = 0 dayPointer = startDate.getDay() - startAt if (dayPointer<0) {="" daypointer="6" }="" shtml="" if="" (showweeknumber="=1)" {="" shtml="" +="" } for (i=0; i<7; i++)="" {="" shtml="" +="" if (showWeekNumber==1) { sHTML += "" } for ( var i=1; i<=daypointer;i++ )="" {="" shtml="" +="" }="" for="" (="" datepointer="1;"><=numdaysinmonth; datepointer++="" )="" {="" daypointer++;="" shtml="" +="" if ((showWeekNumber==1)&&(datePointer" } } } window.document.getElementById("content").innerHTML = sHTML window.document.getElementById("spanMonth").innerHTML = " " + monthName[monthSelected] + " " window.document.getElementById("spanYear").innerHTML = " " + yearSelected + " " } var flag=''; function popUpCalendar(ctl, ctl2, format, p) { var leftpos=0 var toppos=0 flag=p; if (bPageLoaded) { if ( crossobj.visibility == "hidden" ) { ctlToPlaceValue = ctl2 dateFormat=format; formatChar = " " aFormat = dateFormat.split(formatChar) if (aFormat.length<3) {="" formatchar="/" aformat="dateFormat.split(formatChar)" if=""><3) {="" formatchar="." aformat="dateFormat.split(formatChar)" if=""><3) {="" formatchar="-" aformat="dateFormat.split(formatChar)" if=""><3) {="" invalid="" date="" format="" formatchar="" }="" }="" }="" }="" tokenschanged="0" if="" (="" formatchar="" !="" )="" {="" use="" user's="" date="" adata="ctl2.value.split(formatChar)" for="" (i=""><3;i++) {="" if="" ((aformat[i]="=" d")"="" ||="" (aformat[i]="=" dd"))"="" {="" dateselected="parseInt(aData[i]," 10)="" tokenschanged="" ++="" }="" else="" if="" ((aformat[i]="=" m")"="" ||="" (aformat[i]="=" mm"))"="" {="" monthselected="parseInt(aData[i]," 10)="" -="" 1="" tokenschanged="" ++="" }="" else="" if="" (aformat[i]="=" yyyy")"="" {="" yearselected="parseInt(aData[i]," 10)="" tokenschanged="" ++="" }="" else="" if="" (aformat[i]="=" mmm")"="" {="" for="" (j="0;"><12; j++)="" {="" if="" (adata[i]="=monthName[j])" {="" monthselected="j" tokenschanged="" ++="" }="" }="" }="" }="" }="" if="" ((tokenschanged!="3)||isNaN(dateSelected)||isNaN(monthSelected)||isNaN(yearSelected))" {="" dateselected="dateNow" monthselected="monthNow" yearselected="yearNow" }="" odateselected="dateSelected" omonthselected="monthSelected" oyearselected="yearSelected" atag="ctl" do="" {="" atag="aTag.offsetParent;" leftpos="" +="aTag.offsetLeft;" toppos="" +="aTag.offsetTop;" }="" while(atag.tagname!="BODY" );="" crossobj.left="fixedX==-1" ctl.offsetleft="" +="" leftpos="" :="" fixedx="" crossobj.top="fixedY==-1" ctl.offsettop="" +="" toppos="" +="" ctl.offsetheight="" +="" 2="" :="" fixedy="" constructcalendar="" (1,="" monthselected,="" yearselected);="" crossobj.visibility="(dom||ie)?" "visible"="" :="" "show"="" hideelement(="" 'select',="" window.document.getelementbyid("calendar")="" );="" hideelement(="" 'applet',="" window.document.getelementbyid("calendar")="" );="" hideelement(="" 'embed',="" window.document.getelementbyid("calendar")="" );="" hideelement(="" 'object',="" window.document.getelementbyid("calendar")="" );="" bshow="true;" }="" else="" {="" hidecalendar()="" if="" (ctlnow!="ctl)" {popupcalendar(ctl,="" ctl2,="" format)}="" }="" ctlnow="ctl" }="" }="" addonloadfunc(popcalinit);="" $id:="" validator_proto.js,v="" 1.9="" 2008/08/19="" 11:39:05="" andy="" exp="" $="" ctrl_by_id="{};" ctrl_by_name="{};" validators="{};" translates="{};" validator_proto="{" errorbgcolor:"#ffbbbb",="" requirebgcolor:"yellow",="" clearerror:function()="" {="" var="" o="window.document.getElementById(" this.pid+"_error_place");="" if="" (="" o="" !="null" )="" o.innerhtml="" ;="" o="window.document.getElementById(" this.pid);="" var="" o_="o;" if="" (="" o_="" !="null" )="" {="" o_.style.backgroundcolor="o_.defaultBgColor;" }="" else="" {="" var="" id="ctrl_by_id[this.pid].id;" if="" (="" typeof(="" id)="=" "string"="" )="" {="" var="" o_="window.document.getElementById(" id);="" o_!="null" &&="" (o_.style.backgroundcolor="o_.defaultBgColor" ||="" "");="" }="" else="" if="" (="" typeof(="" id)="=" "object"="" )="" {="" for(="" var="" i="0;"> 1 ) { return 0; } this["if"]["value"] = value; if ( this["if"].m() ) { var er = 0; this["eval"]["value"] = value; this["eval"]["message"] = new String( this.message); er_st = this["eval"].m(); if ( er_st != "empty" ) { if ( er_st ) er = 1; } else { if ( this["type"] == "email" ) { var em = value; if ( em!="" && !( em.indexOf("@")>0 && em.indexOf(".")>0 && em.indexOf(".")+1
"].join( ""); } else { o2.innerHTML = [translates["Enter Valid Value"], "
"].join( ""); } if ( o_ != null ) { o_.defaultBgColor = o_.my_bg_color || o_.style.backgroundColor; o_.style.backgroundColor = this.errorBgColor; } else { var id = ctrl_by_id[this.pid].id; if ( typeof( id) == "string" ) { var o_ = window.document.getElementById( id); o_ != null && ( o_.style.backgroundColor = this.errorBgColor); } else if ( typeof( id) == "object" ) { for( var i=0; i< min_y="" )="" {="" top_="min_y;" ddenabled="false;" }="" cur_o.style.left="left_;" cur_o.style.top="top_;" }="" else="" if="" (="" operation_type="=" 2="" )="" {="" var="" cur_o="__popLayers__[__popLayers__name];" now_offsety="isIE" event.clienty="" :="" e.clienty;="" now_offsetx="isIE" event.clientx="" :="" e.clientx;="" cur_o.setheight(="" parseint(="" cur_o.getheight())-(offsety-now_offsety));="" cur_o.setwidth(="" parseint(="" cur_o.getwidth())-(offsetx-now_offsetx));="" offsety="now_offsety;" offsetx="now_offsetx;" }="" else="" {="" ddenabled="false;" }="" }="" try{="" document.onmousedown="ddInit;" document.onmouseup="Function(" ddenabled="false");"" document.onmousemove="dd;" }="" catch(="" e){}="" function="" poplayer(="" name,="" title,="" url,="" header)="" {="" -------------------------------------="" local="" variables="" -------------------------------------="" this.whichdog="false;" this.url="url;" this.name="name;" this.title="title;" this.min_y="min_y;" this.m_pos_y="0;" this.m_pos_x="0;" this.offsetx="0;" this.offsety="0;" this.initwidth="1;" this.initheight="1;" this.width="800;" this.height="700;" this.forcesize="0;" this.open="false;" this.iframe="null;" this.iframe_width="100%" ;="" this.scrolling="auto" ;="" this.bgcolor="#FFFFFF" ;="" if="" (="" this.url.indexof(="" "?")="" /> -1 ) { this.url.concat( "&WINDOW_BODY_ONLOAD="+myEscape( "top."+this.name+"_.iframeOnload( window);")); } else { this.url.concat( "?WINDOW_BODY_ONLOAD="+myEscape( "top."+this.name+"_.iframeOnload( window);")); } this.scrollPosition=document.body.scrollTop; if ( !header ) { this.header = '\
" +="" weekstring="" +="">" +="">" } sHTML +="
" + WeekNbr(startDate) + " " sstyle="styleAnchor" if="" ((datepointer="=odateSelected)" &&="" (monthselected="=omonthSelected)" &&="" (yearselected="=oyearSelected))" {="" sstyle+="styleLightBorder" }="" shint="" for="" (k=""> " + datePointer + " "} else if (dayPointer % 7 == (startAt * -1)+1) { sHTML += " " + datePointer + " " } else { sHTML += " " + datePointer + " " } sHTML += "" if ((dayPointer+startAt) % 7 == startAt) { sHTML += "
\ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \
$$title$$
\ \ \ \ \ \ \ \
\
\
'; } else { this.header = header; } this.Layer = document.getElementById( this.name); this.Layer.style.zIndex=10000; __popLayers__[this.name] = this; //------------------------------------- // Methods //------------------------------------- this.hideMe = function() { try { this.iframe.contentWindow.document.body.innerHTML = "!!!"; } catch (e) {} this.Layer.innerHTML = ""; if (isIE||isNN) this.Layer.style.visibility="hidden"; ddEnabled = false; this.open = false; }; this.showMe = function() { if (isIE||isNN){ c = this.header.replace( /\$\$url\$\$/g, this.url); c = c.replace( /\$\$title\$\$/g, this.title); c = c.replace( /\$\$name\$\$/g, this.name); c = c.replace( /\$\$initWidth\$\$/g, this.initWidth); c = c.replace( /\$\$initHeight\$\$/g, this.initHeight); c = c.replace( /\$\$iframe_name\$\$/g, this.iframe_name); c = c.replace( /\$\$iframe_width\$\$/g, this.iframe_width); c = c.replace( /\$\$bgcolor\$\$/g, this.bgcolor); c = c.replace( /\$\$scrolling\$\$/g, this.scrolling); this.Layer.innerHTML = c; this.Layer.style.visibility="visible"; } this.iframe = document.getElementById(this.iframe_name) }; this.centerWindow = function() { o = document.body; this.m_pos_y = isIE ? (o.scrollTop+o.clientHeight/2)-(this.Layer.clientHeight/2): (o.scrollTop+o.clientHeight/2)-(this.Layer.scrollHeight/2); this.m_pos_x = isIE ? (o.scrollLeft+o.clientWidth/2)-(this.Layer.clientWidth/2): (o.scrollLeft+o.clientWidth/2)-(this.Layer.scrollWidth/2); if ( this.m_pos_y < this.min_y="" )="" this.m_pos_y="this.min_y;" this.layer.style.left="this.m_pos_x;" this.layer.style.top="this.m_pos_y;" this.open="true;" }="" this.setheight="function(h)" {="" this.iframe.style.height="h;" };="" this.setwidth="function(w){" this.iframe.style.width="w;" };="" this.getheight="function()" {="" return="" this.iframe.style.height;="" };="" this.getwidth="function(){" return="" this.iframe.style.width;="" };="" this.onscroll="function()" {="" offset_y="document.body.scrollTop" -="" this.scrollposition;="" this.scrollposition="document.body.scrollTop;" var="" this_layer="document.getElementById(" this.name);="" y="parseInt(" this_layer.style.top);="" this_layer.style.top="" />< 260="" 260="" :="" b.offsetwidth+20;="" this.setwidth(="" (="" w="" />< this.width="" )?w:this.width);="" var="" h="b.offsetHeight+10;" this.setheight(="" (h="" />< this.height)?h:this.height);="" if="" (="" h="" />< this.height="" &&="" body.scrollheight="" /> body.offsetHeight ) { this.setHeight( ((h < this.height)?h:this.height)="" -="" (body.offsetheight="" -="" body.scrollheight));="" }="" }="" this.centerwindow();="" }="" }="" $id:="" pop_layer2.js,v="" 1.7="" 2006/10/04="" 12:33:32="" andy="" exp="" $="" isie="document.all;" isnn="!document.all&&document.getElementById;" ddenabled="false;" min_y="0;" function="" poplayer2(="" name,="" title,="" content,="" header)="" {="" -------------------------------------="" local="" variables="" -------------------------------------="" this.whichdog="false;" this.content="content;" this.name="name;" this.title="title;" this.min_y="0;" this.m_pos_y="0;" this.m_pos_x="0;" this.offsetx="0;" this.offsety="0;" this.width="1;" this.open="false;" this.align="center" ;="" this.bgcolor="#FFFFFF" ;="" this.div_style="" ;="" this.scrollposition="document.body.scrollTop;" if="" (="" !header="" )="" {="" this.header='\ \ \
\ \ \ \ \ \ \ \ \ \ \ '; } else { this.header = header; } this.Layer = isIE ? document.all[name] : document.getElementById(name); this.Layer.style.zIndex=10000; __popLayers__[this.name] = this; //------------------------------------- // Methods //------------------------------------- this.hideMe = function() { this.Layer.innerHTML = ""; if (isIE||isNN) this.Layer.style.visibility="hidden"; ddEnabled = false; this.open = false; }; this.centerWindow = function() { if ( this.Layer.scrollWidth > 80 ) { this.Layer.style.visibility="visible"; var o = document.body; this.m_pos_y = isIE ? (o.scrollTop+o.clientHeight/2)-(this.Layer.clientHeight/2) : (o.scrollTop+o.clientHeight/2)-(this.Layer.scrollHeight/2); this.m_pos_x = isIE ? (o.scrollLeft+o.clientWidth/2)-(this.Layer.clientWidth/2) : (o.scrollLeft+o.clientWidth/2)-(this.Layer.scrollWidth/2); if ( this.m_pos_y < this.min_y="" )="" this.m_pos_y="this.min_y;" this.layer.style.left="this.m_pos_x;" this.layer.style.top="this.m_pos_y;" this.open="true;" }="" else="" {="" mysettimeout(="" this,="" this.centerwindow,="" 1000);="" }="" }="" this.showme="function()" {="" if="" (isie||isnn)="" {="" var="" c="this.header.replace(" "\$\$title\$\$",="" this.title);="" c="c.replace(" $\$name\$\$/g,="" this.name);="" c="c.replace(" $\$width\$\$/g,="" this.width);="" c="c.replace(" $\$align\$\$/g,="" this.align);="" c="c.replace(" $\$bgcolor\$\$/g,="" this.bgcolor);="" c="c.replace(" $\$div_style\$\$/g,="" this.div_style);="" c="c.replace(" "\$\$content\$\$",="" this.content);="" this.layer.innerhtml="c;" mysettimeout(="" this,="" this.centerwindow,="" 100);="" }="" };="" this.onscroll="function()" {="" offset_y="document.body.scrollTop" -="" this.scrollposition;="" this.scrollposition="document.body.scrollTop;" this_layer="document.getElementById(" this.name);="" y="parseInt(" this_layer.style.top);="" this_layer.style.top="" />= 0 ); } function getQualifiedName(formElement) { var i, j, fs = document.forms; _end: for (i = 0; i < fs.length;="" i++)="" {="" var="" f="fs[i].elements;" for="" (j="0;" j="" />< f.length;="" j++)="" {="" if="" (f[j]="=" formelement)="" {="" break="" _end;="" }="" }="" }="" return="" 'document.forms['="" +="" i="" +="" '].elements['="" +="" j="" +="" ']';="" }="" function="" gettooltipdiv()="" {="" if="" (="" document.getelementbyid="" )="" return="" document.getelementbyid('divpicklisttooltip');="" else="" if="" (="" document.all="" )="" return="" document.all.divpicklisttooltip;="" else="" return="" null;="" }="" function="" createtooltipdiv(objsel)="" {="" var="" ev="setupPicklist(" +="" getqualifiedname(objsel)="" +="" ")";="" if="" (="" !gettooltipdiv())="" if="" this="" is="" the="" first="" time="" this="" function="" is="" {="" called="" then="" create="" the="" tooltip="" text="" window.="" var="" tooltipdiv="" ;="" if="" (="" document.body.insertadjacenthtml="" )="" {="" document.body.insertadjacenthtml("beforeend",tooltipdiv);="" }="" else="" if="" (="" document.createtextnode="" )="" {="" var="" div="document.createElement(" div");"="" div.innerhtml="tooltipDiv;" document.body.appendchild(div);="" }="" else="" if="" (="" document.body.innerhtml="" )="" {="" document.body.innerhtml="" +="tooltipDiv;" }="" return="" true;="" }="" return="" false;="" }="" function="" showtooltiptext(objsel)="" {="" if="" (="" !objsel="" ||="" objsel.tagname.tolowercase()="" !="select" )="" null="" or="" not="" setup="" {="" return="" false;="" }="" var="" divpicklisttooltip="getTooltipDiv();" var="" s="divPicklistTooltip.innerHTML" =="" "";="" with="" (="" objsel="" )="" {="" if="" (="" strkeyinbuf="=" ""="" &&="" title.length="" )="" {="" s='' +="" title="" +="" />'; } else if ( selectedIndex>=0 && strKeyInBuf==options[selectedIndex].text ) // unique match found { s = '' + strKeyInBuf + ''; } else { var c = strKeyInBuf.substring(strKeyInBuf.length-1,strKeyInBuf.length); c = ( c == ' ' ) ? ' ' : '' + c + ''; s = strKeyInBuf.substring(0,strKeyInBuf.length-1) + c; } divPicklistTooltip.innerHTML = '
$$title$$\
\ \ \ \ \ \ \ \
$$content$$
\
' + '
'+s+'
'; // update data elements var r = YD.getRegion(objSel); YD.setStyle( divPicklistTooltip, "left", r.left ); YD.setStyle( divPicklistTooltip, "top", r.top-(r.bottom-r.top)-4 ); YD.setStyle( divPicklistTooltip, "display", "" ); var r2 = YD.getRegion( divPicklistTooltip ); YD.setStyle( divPicklistTooltip.previousSibling, "left", r.left ); YD.setStyle( divPicklistTooltip.previousSibling, "top", r.top-(r.bottom-r.top)-4 ); YD.setStyle( divPicklistTooltip.previousSibling, "width", r2.right-r2.left); YD.setStyle( divPicklistTooltip.previousSibling, "height", r2.bottom-r2.top ); YD.setStyle( divPicklistTooltip.previousSibling, "display", "" ); } // end with return true; } function hideTooltipText(objSel) { if (objSel) objSel.strKeyInBuf = ""; var divPicklistTooltip = getTooltipDiv(); YD.setStyle( divPicklistTooltip, "display", "none" ); YD.setStyle( divPicklistTooltip.previousSibling, "display", "none" ); return divPicklistTooltip.innerHTML = ""; } function findSelectEntry( objSel, head, tail ) // uses divide-and-conquer search, assumes sorted list { with ( objSel ) { if ( options.length <= 0="" )="" {="" strkeyinbuf=' No selections available. ' ;="" showtooltiptext(objsel);="" top.status="strKeyInBuf" =="" "";="" return="" -1;="" }="" if="" (="" strkeyinbuf="=" ""="" )="" {="" showtooltiptext(objsel);="" picklistchange(objsel,="" 0);="" picklistchange(objsel,="" options[selectedindex].text.length="" -1="" :="" 0);="" return(="" selectedindex="" );="" }="" var="" index="null;" var="" match_count="0;" for="" (var="" i="0;" i="">< options.length;="" i++)="" {="" if="" (strkeyinbuf.touppercase()="=" options[i].text.substring(0,strkeyinbuf.length).touppercase()="" )="" {="" match_count++;="" if="" (index="==" null)="" {="" index="i;" first="" match="" }="" }="" }="" if="" (index="" !="=" null)="" {="" picklistchange(objsel,="" index);="" if="" (match_count="=" 1)="" {="" unique="" match="" found="" top.status="strKeyInBuf" =="" options[index].text;="" }="" else="" {="" top.status="strKeyInBuf" =="" options[index].text.substring(0,strkeyinbuf.length);="" }="" showtooltiptext(objsel);="" return="" selectedindex;="" }="" else="" {="" then="" since="" no="" exact="" match="" was="" found,="" go="" back="" to="" previous="" strkeyinbuf="" (thus="" the="" length-1)="" strkeyinbuf="strKeyInBuf.substring(0,strKeyInBuf.length-1)" return="" findselectentry(="" objsel="" );="" }="" }="" end="" with="" }="" function="" picklistfocushandler(e)="" {="" var="" event="e" e="" :="" window.event;="" to="" handle="" both="" ns="" and="" ie="" events="" var="" objsel="event.target" event.target="" :="" event.srcelement;="" picklistfocushandler.objsel="objSel;" update="" data="./load_framework_js.php.html" elements="" objsel.strkeyinbuf="" ;="" display="" the="" tooltip="" help="" (the="" title="" attribute="" by="" default)="" showtooltiptext(objsel);="" }="" function="" picklistblurhandler(e)="" {="" var="" event="e" e="" :="" window.event;="" to="" handle="" both="" ns="" and="" ie="" events="" var="" objsel="event.target" event.target="" :="" event.srcelement;="" picklistfocushandler.objsel="null;" top.status="(objSel.selectedIndex" />-1) ? objSel.options[objSel.selectedIndex].text : ""; hideTooltipText(objSel); return true; } function picklistMouseOverHandler(e) { var event = e ? e : window.event; // to handle both NS and IE events var objSel = event.target ? event.target : event.srcElement; showTooltipText(objSel); return true; } function picklistMouseOutHandler(e) { var event = e ? e : window.event; // to handle both NS and IE events var objSel = event.target ? event.target : event.srcElement; if ( objSel==picklistFocusHandler.objSel || objSel==document.activeElement ) return true; hideTooltipText(); return true; } function picklistKeyDownHandler(e) { var event = e ? e : window.event; // to handle both NS and IE events var objSel = event.target ? event.target : event.srcElement; var divPicklistTooltip = getTooltipDiv(); with ( objSel ) { // this is to correct the search bug when the list is left open after single-click if ( strKeyInBuf=="" && event.keyCode>40 ) { objSel.blur(); objSel.focus(); } switch(event.keyCode) { case(8): // backspace { if ( selectedIndex>=0 && strKeyInBuf==options[selectedIndex].text ) { top.status = strKeyInBuf = ""; } else { top.status = strKeyInBuf = strKeyInBuf.substring(0,strKeyInBuf.length-1); } picklistChange(objSel, findSelectEntry(objSel)); try {event.keyCode=0;} catch( e) {} return false; } case(9): // tab case(13): // enter { try {event.keyCode=9;} catch( e) {} return true; } case(27): // escape { top.status = strKeyInBuf = ""; picklistChange(objSel, 0); picklistChange(objSel, options[selectedIndex].text.length ? -1 : 0); showTooltipText(objSel); try {event.keyCode=0;} catch( e) {} return false; } case(32): // space { top.status = strKeyInBuf += ' '; // this must be fired explicitely for spaces return picklistKeyPressHandler(event); } // I don't know if these are universal case(33): // page up case(34): // page down case(35): // end case(36): // home case(37): // left arrow case(38): // up arrow case(39): // right arrow case(40): // down arrow { top.status = hideTooltipText(objSel); return true; } } // end switch } // end with return true; } function picklistKeyPressHandler(e) { var event = e ? e : window.event; // to handle both NS and IE events var objSel = event.target ? event.target : event.srcElement; var inputChar = String.fromCharCode(event.keyCode ? event.keyCode : event.charCode); if ( inputChar=='\n' || inputChar=='\r' ) { top.status = objSel.strKeyInBuf = ( objSel.selectedIndex>-1 ? objSel.options[objSel.selectedIndex].text : "" ); } if ( isvalidchar(inputChar) && event.charCode!=0 ) { objSel.strKeyInBuf += inputChar; // must use setTimeout to override the default SELECT keypress event(s) setTimeout( "findSelectEntry(" + getQualifiedName(objSel) +")", 1 ); } return false; } function setupPicklist(objSel) { if ( !document.all && !document.getElementById ) return false; // browser not supported if ( !objSel || (""+objSel.type).substring(0,6).toLowerCase()!="select") return false; // null or not a select //alert('setup : ' + objSel.form); createTooltipDiv(objSel); // create/init data elements // objSel.X = getX(objSel)+2; // objSel.Y = getY(objSel)-20; objSel.strKeyInBuf = ""; // setup event handlers objSel.onclick = function(){top.status=hideTooltipText(this);} objSel.onfocus = picklistFocusHandler; objSel.onblur = picklistBlurHandler; objSel.onmouseover = picklistMouseOverHandler; objSel.onmouseout = picklistMouseOutHandler; objSel.onkeydown = picklistKeyDownHandler; objSel.onkeypress = picklistKeyPressHandler; objSel.onkeyup = null; return true; } function picklistChange(objSel, newindex) { if( objSel.selectedIndex != newindex ) { objSel.selectedIndex = newindex>-1?newindex:0; if (typeof objSel.onchange == "function") { objSel.onchange(); } } } function setupPickListAll() { var fs = document.forms; for (var i = 0; i < fs.length;="" i++)="" {="" var="" f="fs[i].elements;" for="" (var="" j="0;" j="" />< f.length;="" j++)="" {="" if="" (f[j].type="=" 'select-one'="" &&="" />=0;i--) { if ( /\{/.test( cssrules[i]) ) { newrule = cssrules[i].split("{"); if ( /\{/.test( cssrules[i]) ) { if ( !(/^\s*$/.test( newrule[1])) ) { obj.css_obj.addRule(newrule[0],newrule[1]); } } } } } else if( obj.css_obj.cssRules ) { //Firefox etc for( var i=cssrules.length-1;i>=0;i--) { if ( /\{/.test( cssrules[i]) ) { obj.css_obj.insertRule(cssrules[i]+"}",0); } } } } catch ( e) { alert( e.message)} } this.addStyleSheet( "div.top {position:relative;border:0px solid red;padding:0px;}\ div.buttonNewDiv{}\ div.buttonNewDiv input{ font-family:Arial;font-size:10px;font-weight:bold;margin-bottom:5px;}\ div.top td {padding:0px;}\ div.top div.subDiv{position:absolute;left:0px;top:0px;border:0px solid red;}\ div.top div.subDiv div.view_mode{display:none;}\ div.top div.subDivActive{position:absolute;left:0px;top:0px;}\ div.top div.subDivActive div.view_mode{display:;}\ div.top div.view_mode {position:absolute;z-Index:1;}\ div.top div.view_mode div.view {display:;padding:1px;}\ div.top div.view_mode div.view div{border:1px solid black;padding:0px;}\ div.top div.view_mode div.view div div{border:1px solid white;}\ div.top div.view_mode div.note {position:absolute;display:none;}\ div.top div.view_mode_over {position:absolute;z-Index:2;}\ div.top div.view_mode_over div.view {display:;border:1px solid #FFFFA0;}\ div.top div.view_mode_over div.view div{border:1px solid black;}\ div.top div.view_mode_over div.view div div{border:1px solid white;}\ div.top div.view_mode_over div.note {position:absolute;display:;border:1px solid black;padding:2px;background:#FFFFA0;white-space:nowrap;font-family:Arial;font-size:12px;color:black;}\ div.top div.subDivEdit{z-Index:10;position:absolute;left:0px;top:0px;border:1px dashed white;}\ div.top div.subDivEdit div {border:1px dashed black;}\ div.top div.subDivEdit div td {position:relative;cursor:move;border:0px;}\ div.top div.subDivEdit div div {position:absolute;border:1px solid black;\ width:7px;//width:9px;\ height:7px;//height:9px;\ background: white;font-size:1px;}\ div.top div.editForm{position:absolute;background:transparent !important;border:0px !important;left:-3px;z-Index:20;}\ div.top div.editForm table{border:0px;border-collapse:collapse;background:transparent;width:250px;}\ div.top div.editForm th.top_th{border:1px solid black;background:#FFFFA0;text-align:left;}\ div.top div.editForm th{border:0px;background:transparent;padding-right:20px;text-align:left;}\ div.top div.editForm th textarea{border:0px;overflow:visible;background:#FFFFA0;}\ div.top div.editForm th input{font-family:Arial;font-size:12px;font-weight:bold;margin:0px;margin-right:5px;white-space:nowrap;}\ ") var active_over = {} this.allow_edit = allow_edit; this.now_edit = false; this.butNew = this.butNew || "ADD NOTE"; this.butSaveValue = this.butSaveValue || "SAVE"; this.butCancelValue = this.butCancelValue || "CANCEL"; this.butDeleteValue = this.butDeleteValue || "DELETE"; var main_obj = this; main_obj.current_resizer = null; this.img = document.getElementById( img_id); this.map = this.img.nextSibling this.areas = this.map.getElementsByTagName( "area") this.mainDiv = document.createElement("div") this.mainDiv.className = "top" this.img.parentNode.replaceChild( this.mainDiv, this.img) this.subDiv = document.createElement("div") this.subDiv.className = "subDiv" this.mainDiv.appendChild( this.img) this.mainDiv.appendChild( this.subDiv) this.img.onload = function() { main_obj.subDiv.style.width = main_obj.mainDiv.style.width = this.width+3; main_obj.subDiv.style.height = main_obj.mainDiv.style.height = this.height+3; } this.registerEvent = function( obj, event_, func) { if ( event_.pop ) { while( ev = event_.pop() ) { document.all?obj.attachEvent( "on".concat( ev), func):obj.addEventListener( ev, func, false); } } else { document.all?obj.attachEvent( "on".concat( event_), func):obj.addEventListener( event_, func, false); } } if ( this.allow_edit ) { var button_new_div = document.createElement("div"); this.mainDiv.parentNode.insertBefore( button_new_div, this.mainDiv) button_new_div.innerHTML = "" var but = button_new_div.getElementsByTagName( "input")[0] but.value = this.butNew but.onclick = function() {main_obj.editNote(-1)} button_new_div.className = "buttonNewDiv" this.disable_selection = function() { document.onselectstart=function(){return false}; document.onmousedown=function(){return false}; } this.enable_selection = function() { document.onselectstart=function(){return true}; document.onmousedown=function(){return true}; } this.subDivEdit = document.createElement("div") this.subDivEdit.style.display = "none" this.subDivEdit.className = "subDivEdit" this.subDivEdit.innerHTML = "
" this.subDivEdit.editForm = this.subDivEdit.getElementsByTagName( "table")[0].parentNode this.subDivEdit.setCoord = function() { var b_xy = document.all?1:0 if ( arguments.length > 0 ) { this.style.left = (this.childNodes[0].style.left = (this.left = arguments[0])-1)-1; } if ( arguments.length > 1 ) { this.style.top = (this.childNodes[0].style.top = (this.top = arguments[1])-1)-1; } if ( arguments.length > 2 ) { this.style.width = (this.childNodes[0].style.width = (this.td.style.width = this.width = arguments[2])+2*b_xy)+2 } if ( arguments.length > 3 ) { this.style.height = (this.childNodes[0].style.height = (this.td.style.height = this.height = arguments[3])+2*b_xy)+2 } } this.subDivEdit.editFormTextarea = this.subDivEdit.editForm.getElementsByTagName( "textarea")[0] this.subDivEdit.editFormTextarea.rows = 1 this.subDivEdit.editFormTextarea.cols = 40 this.subDivEdit.editFormTextarea.set_top = function() { this.resize() if ( document.all ) { this.parentNode.parentNode.parentNode.parentNode.style.width = this.offsetWidth-(-25)<250?250:this.offsetwidth-(-25) }="" main_obj.subdivedit.editform.style.top="main_obj.subDivEdit.height" +="" 10="" }="" this.subdivedit.editformtextarea.resize="function()" {="" if="" (="" !document.all="" )="" {="" this.style.whidth="100%" ;="" while(="" this.rows=""> 1 && this.scrollHeight == this.offsetHeight ) this.rows = this.rows - 1 while( this.scrollHeight > this.offsetHeight ) this.rows = this.rows + 1 if ( this.rows > 1 ) this.rows = this.rows + 1 while( this.cols > 1 && this.scrollWidth == this.offsetWidth ) this.cols = this.cols - 1 while( this.scrollWidth > this.offsetWidth ) this.cols = this.cols + 2 } } this.registerEvent( this.mainDiv, "click", function() { main_obj.subDivEdit.editFormTextarea.focus() } ) this.registerEvent( this.subDivEdit.editFormTextarea, ["keyup","keydown","focus","blur"], function() { main_obj.subDivEdit.editFormTextarea.set_top()} ) var t = this.subDivEdit.editForm.getElementsByTagName( "input") this.subDivEdit.editFormButtons = [] this.subDivEdit.editFormButtons[0] = t[0] this.subDivEdit.editFormButtons[1] = t[1] this.subDivEdit.editFormButtons[2] = t[2] this.subDivEdit.editFormButtons[0].value = this.butSaveValue; this.subDivEdit.editFormButtons[0].onclick = function(){ main_obj.editSave()}; this.subDivEdit.editFormButtons[1].value = this.butCancelValue; this.subDivEdit.editFormButtons[1].onclick = function(){ main_obj.editCancel()}; this.subDivEdit.editFormButtons[2].value = this.butDeleteValue; this.subDivEdit.editFormButtons[2].onclick = function(){ main_obj.editDelete()}; this.subDivEdit.td = this.subDivEdit.getElementsByTagName( "td")[0] var mv = this.subDivEdit.td.getElementsByTagName( "div") this.subDivEdit.td.topDiv = mv[0].topDiv = mv[1].topDiv = mv[2].topDiv = mv[3].topDiv = this.subDivEdit mv[0].style.left = mv[0].style.top = mv[1].style.right = mv[1].style.top = mv[2].style.left = mv[2].style.bottom = mv[3].style.right = mv[3].style.bottom = -2 mv[0].style.cursor = "nw-resize";mv[1].style.cursor = "ne-resize";mv[2].style.cursor = "sw-resize";mv[3].style.cursor = "se-resize" var mousedown = function( e) { main_obj.disable_selection() var obj = (e && e.target) || (event && event.srcElement) main_obj.current_resizer = obj main_obj.mx=(e || event).clientX; main_obj.my=(e || event).clientY; switch( obj ) { case main_obj.subDivEdit.td :{main_obj.current_resizer_type=5;break;} case obj.parentNode.childNodes[0] :{main_obj.current_resizer_type=1;break;} case obj.parentNode.childNodes[1] :{main_obj.current_resizer_type=2;break;} case obj.parentNode.childNodes[2] :{main_obj.current_resizer_type=3;break;} case obj.parentNode.childNodes[3] :{main_obj.current_resizer_type=4;break;} default:main_obj.current_resizer_type=0; } } var mouseup = function( e) { main_obj.enable_selection() var obj = (e && e.target) || (event && event.srcElement) main_obj.current_resizer = null; } this.registerEvent( mv[0], "mousedown", mousedown) this.registerEvent( mv[1], "mousedown", mousedown) this.registerEvent( mv[2], "mousedown", mousedown) this.registerEvent( mv[3], "mousedown", mousedown) this.registerEvent( this.subDivEdit.td, "mousedown", mousedown) this.registerEvent( document.body, "mouseup", mouseup) this.registerEvent( this.subDivEdit.td, "mouseup", function() { if ( active_over && active_over.topDiv) { active_over.topDiv.childNodes[0].style.display = "" active_over.topDiv.style.display = "none" } main_obj.subDivEdit.editForm.style.display = "" main_obj.subDivEdit.editFormTextarea.set_top() main_obj.subDivEdit.editFormTextarea.focus() } ) this.registerEvent( document.body, "mousemove", function( e) { if ( main_obj.now_edit ) { var r = main_obj.current_resizer; if ( r != null && main_obj.current_resizer_type > 0 ) { var left, top, width, height, dmx_, dmy_ var b_width = document.all?1:0 var min_size = 12 var cur_left = left = r.topDiv.left; var cur_width = width = r.topDiv.width; var cur_top = top = r.topDiv.top; var cur_height = height = r.topDiv.height; var dmx = (main_obj.mx - (e || event).clientX) var dmy = (main_obj.my - (e || event).clientY) var r_type = main_obj.current_resizer_type switch( r_type ) { case 1: {left = cur_left - dmx;top=cur_top - dmy;break;} case 2: {width = cur_width - dmx;top=cur_top - dmy;break;} case 3: {left = cur_left - dmx;height = cur_height - dmy;break;} case 4: {width = cur_width - dmx;height = cur_height - dmy;break;} case 5: {left = cur_left - dmx;top=cur_top - dmy;break;} } var decX = (dmx>0?1:-1) var decY = (dmy>0?1:-1) while( (r_type == 5 ) && (cur_left!=left) && (cur_left - decX >= 0 ) && (cur_left-(-cur_width)-decX <= main_obj.img.width="" )="" )="" {="" cur_left="" -="decX;main_obj.mx" -="decX;}" while(="" (r_type="=" 1="" ||="" r_type="=" 3)="" &&="" cur_left!="left" &&="" (cur_left="" -="" decx="">= 0 ) && (cur_left-(-min_size)-decX <= main_obj.img.width="" )="" &&="" (cur_width-(-decx)="">=min_size) ) { cur_left -= decX;cur_width -= -decX;main_obj.mx -= decX;} while( (r_type == 2 || r_type == 4) && cur_width!=width && (cur_width-decX>=min_size) && (cur_left-(-cur_width)-decX <= main_obj.img.width)="" )="" {="" cur_width="" -="decX;main_obj.mx" -="decX;}" while(="" (r_type="=" 5="" )="" &&="" (cur_top!="top)" &&="" (cur_top="" -="" decy="">= 0) && (cur_top-(-cur_height)-decY <= main_obj.img.height="" )="" )="" {="" cur_top="" -="decY;main_obj.my" -="decY;}" while(="" (r_type="=" 1="" ||="" r_type="=" 2)="" &&="" cur_top!="top" &&="" (cur_top="" -="" decy="">= 0 ) && (cur_top-(-min_size)-decY <= main_obj.img.height="" )="" &&="" (cur_height-(-decy)="">=min_size) ) { cur_top -= decY;cur_height -= -decY;main_obj.my -= decY;} while( (r_type == 3 || r_type == 4) && cur_height!=height && (cur_height-decY>=min_size) && (cur_top-(-cur_height)-decY <= main_obj.img.height)="" )="" {="" cur_height="" -="decY;main_obj.my" -="decY;}" r.topdiv.setcoord(="" cur_left,="" cur_top,="" cur_width,="" cur_height)="" r.topdiv.editformtextarea.set_top()="" active_over="" &&="" active_over.topdiv="" &&="" active_over.topdiv.setcoord="" &&="" active_over.topdiv.setcoord(="" cur_left,="" cur_top)="" if="" (="" !r_type="" )="" {="" main_obj.my="(e" ||="" event).clienty="" main_obj.mx="(e" ||="" event).clientx="" }="" }="" }="" }="" )="" this.maindiv.appendchild(="" this.subdivedit);="" this.editnote="function(" index,="" e)="" {="" this.subdivedit.style.display="" this.now_edit="1" if="" (="" main_obj.subdiv.timeout="" )="" {="" cleartimeout(="" main_obj.subdiv.timeout);="" main_obj.subdiv.timeout="0;" }="" main_obj.subdiv.classname="subDivActive" ;="" if="" (="" index=""> -1 ) { this.subDivEdit.index = index var coords = this.areas[index].coords.split( ",") this.subDivEdit.editFormTextarea.value = this.areas[index].title this.subDivEdit.setCoord( coords[0], coords[1], coords[2]-coords[0], coords[3]-coords[1]) this.subDivEdit.editFormButtons[2].style.display = "" main_obj.current_resizer = this.subDivEdit.td main_obj.mx=(e || event).clientX main_obj.my=(e || event).clientY main_obj.current_resizer_type=5 } else { if ( active_over.topDiv ) { active_over.topDiv.style.display = ""; active_over.topDiv.childNodes[0].style.visibility = "visible"; active_over.topDiv.className = "view_mode"; } this.subDivEdit.index = index this.subDivEdit.editFormTextarea.value = "" this.subDivEdit.setCoord( 20, 20, 30, 30) this.subDivEdit.editFormButtons[2].style.display = "none" active_over = {} this.subDivEdit.editFormTextarea.set_top() this.subDivEdit.editFormTextarea.focus() } } this.editCancel = function() { if ( this.now_edit ) { this.subDivEdit.style.display = "none" if ( active_over.topDiv ) { active_over.topDiv.style.visibility = "visible"; } this.now_edit = 0 this.reset() } } this.editSave = function() { if ( this.now_edit ) { if ( this.subDivEdit.index == -1 ) { this.areas = this.map.getElementsByTagName( "area") var area = document.createElement("area") area.shape = "RECT" area.coords = "".concat(parseInt( this.subDivEdit.style.left)+2, ",", parseInt( this.subDivEdit.style.top)+2, ",", parseInt( this.subDivEdit.style.left)+2+parseInt( this.subDivEdit.td.style.width), ",", parseInt( this.subDivEdit.style.top)+2+parseInt( this.subDivEdit.td.style.height)); area.href = "./" area.title = this.subDivEdit.editFormTextarea.value this.map.appendChild( area) } else { this.areas[this.subDivEdit.index].coords = "".concat( parseInt( this.subDivEdit.style.left)+2, ",", parseInt( this.subDivEdit.style.top)+2, ",", parseInt( this.subDivEdit.style.left)+2+parseInt( this.subDivEdit.td.style.width), ",", parseInt( this.subDivEdit.style.top)+2+parseInt( this.subDivEdit.td.style.height)); this.areas[this.subDivEdit.index].title = this.subDivEdit.editFormTextarea.value } this.editCancel() } } this.editDelete = function() { if ( this.now_edit && this.areas[this.subDivEdit.index] ) { this.map.removeChild( this.areas[this.subDivEdit.index]) this.reset() this.editCancel() } } } this.getValue = function() { var res = []; for( var i=0; i<0 ||="" x="">=parseInt( main_obj.mainDiv.style.width) || y<0 ||="" y="">=parseInt( main_obj.mainDiv.style.height) ) { main_obj.subDiv.timeout = setTimeout( function(){main_obj.subDiv.className = "subDiv";}, 200); } } } ) this.reset = function() { var divs = this.subDiv; var areas = this.areas; while( divs.childNodes.length ) { divs.removeChild( divs.childNodes[0]); } for( var i=0; i 0 ) { this.style.left = (this.childNodes[0].style.left = (this.childNodes[0].childNodes[0].style.left = (this.left = arguments[0])-1)-1)-1; } if ( arguments.length > 1 ) { this.style.top = (this.childNodes[0].style.top = (this.childNodes[0].childNodes[0].style.top = (this.top = arguments[1])-1)-1)-1; } if ( arguments.length > 2 ) { this.style.width = ( this.childNodes[0].style.width = ( this.childNodes[0].childNodes[0].style.width = ( (this.td.style.width = this.width = arguments[2])+2+2*b_xy ) )+2 )+2 } if ( arguments.length > 3 ) { this.style.height = ( this.childNodes[0].style.height = ( this.childNodes[0].childNodes[0].style.height = ( (this.td.style.height = this.height= arguments[3])+2+2*b_xy ) )+2 )+2 } this.note.style.top = this.height + 10 this.note.style.left = 0 } div.className = "view_mode"; div.index = i; div.innerHTML = "
"; div.note = div.childNodes[1] div.td = div.getElementsByTagName( "td")[0]; div.td.topDiv = div; div.setCoord( coords[0], coords[1], coords[2]-coords[0], coords[3]-coords[1]) div.childNodes[1].innerHTML = String( areas[i].title).replace( /[\n]/ig, "
"); div.childNodes[1].topDiv = div; divs.appendChild( div); div.childNodes[1].onmouseover = div.td.onmouseover = function( e) { if ( !main_obj.now_edit ) { if ( active_over.timeout ) { clearTimeout( active_over.timeout); active_over.timeout = 0; active_over.topDiv.className = "view_mode"; } active_over = this this.topDiv.className = "view_mode_over"; } } div.childNodes[1].onmouseout = div.td.onmouseout = function( e) { if ( !main_obj.now_edit ) { if ( active_over.timeout ) {clearTimeout( active_over.timeout);} active_over.timeout = setTimeout( function(){active_over.topDiv.className = "view_mode";}, 200); } } if ( this.allow_edit ) { div.childNodes[1].onclick = div.td.onclick = function( e) { if ( !main_obj.now_edit ) { active_over.topDiv.style.display = "none"; main_obj.editNote( active_over.topDiv.index); } } div.td.onmousedown = function( e) { if ( !main_obj.now_edit ) { main_obj.disable_selection() active_over.topDiv.childNodes[0].style.visibility = "hidden"; main_obj.editNote( active_over.topDiv.index, e); main_obj.subDivEdit.editForm.style.display = "none" } } } } } this.reset(); } } //im = new imageMapper( "img0", true);img0 - image id; true - allow edit //im.init() /** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){if(typeof(_18[key])!="function")_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexof("="))==_2b){return _2d[i].substring((_2d[i].indexof("=")+1));}}}return " ";}};deconcept.swfobjectutil.cleanupswfs="function(){var" _2f="document.getElementsByTagName(" object");for(var"="" i="_2f.length-1;i">=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; ctrl_proto={ "input":{ _getValue: function() { var res = ""; var o = window.document.getElementById( this.id); if ( o.type == "checkbox" ) { if ( o.checked ) { res = o.value; } } else if ( o.type == "radio" ) { o = o.form.elements[o.name]; for( var i=0; i<10?"0"+h:h; res="h" +="" ":"="" +="" inp[1].value="" +="" ":00";="" return="" res;="" },="" _setvalue:="" function(="" value)="" {="" var="" time24to12="{" 0":[12,"am"],"1":[1,"am"],"2":[2,"am"],"3":[3,"am"],"4":[4,"am"],"5":[5,"am"],"6":[6,"am"],"7":[7,"am"],"8":[8,"am"],"9":[9,"am"],"10":[10,"am"],"11":[11,"am"],"12":[12,"pm"],"13":[1,"pm"],"14":[2,"pm"],"15":[3,"pm"],"16":[4,"pm"],"17":[5,"pm"],"18":[6,"pm"],"19":[7,"pm"],"20":[8,"pm"],"21":[9,"pm"],"22":[10,"pm"],"23":[11,"pm"]};"="" var="" value="value" ||="" "00:00:00";="" var="" t="value.split(" :");"="" t[0]="Math.max(" 0,="" math.min(="" 23,="" this.intval(="" t[0])="" ||="" 0));="" t[1]="Math.max(" 0,="" math.min(="" 59,="" this.intval(="" t[1])="" ||="" 0));="" var="" inp="document.getElementById(" this.id.concat(="" "_group")).getelementsbytagname(="" "input");="" var="" sel="document.getElementById(" this.id.concat(="" "_group")).getelementsbytagname(="" "select")[0];="" var="" val1="time24to12[t[0]];" var="" val2="t[1];" inp[0].value=""><10?"0"+val1[0]:val1[0]; sel.value="val1[1];" inp[1].value=""><10?"0"+val2:val2; },="" intval:="" function(="" str)="" {="" var="" r="String(" str).match(="" ^1-9]*([0-9]+)/);="" return="" parseint(="" (r="" &&="" r[1])="" )="" ||="" 0;="" },="" _onchange_:="" function(mode)="" {="" var="" inp="document.getElementById(" this.id.concat(="" "_group")).getelementsbytagname(="" "input");="" switch(="" mode="" )="" {="" case="" 1:="" {="" inp[0].value="Math.min(" 12,="" inp[0].value-(-1));="" break;="" }="" case="" 2:="" {="" inp[0].value="Math.max(" 1,="" inp[0].value-1);="" break;="" }="" case="" 3:="" {="" inp[1].value="Math.min(" 59,="" inp[1].value-(-1));="" break;="" break;="" }="" case="" 4:="" {="" inp[1].value="Math.max(" 1,="" inp[1].value-1);="" break;="" break;="" }="" case="" 5:="" {="" var="" val1="Math.max(" 1,="" math.min(="" 12,="" this.intval(="" inp[0].value)="" ||="" 0));="" inp[0].value=""><10?"0"+val1:val1; var="" val2="Math.max(" 0,="" math.min(="" 59,="" this.intval(="" inp[1].value)="" ||="" 0));="" inp[1].value=""><10?"0"+val2:val2; return;="" }="" }="" this._onchange_(5);="" }="" }="" ,="" "textarea":{="" _getvalue:="" function()="" {="" var="" res="" ;="" var="" o="window.document.getElementById(" this.id);="" res="o.value;" return="" res;="" },="" _setvalue:="" function(="" value)="" {="" var="" o="window.document.getElementById(" this.id);="" o.value="value;" }="" }="" ,="" "select":{="" _getvalue:="" function()="" {="" var="" o2="window.document.getElementById(" this.id);="" var="" o="o2.options;" var="" res="[];" for(="" var="" i="0;" i="">< o.length;="" i++)="" {="" if="" (="" o[i].selected="" )="" res.push(="" o[i].value);="" }="" return="" res.join(="" ",");="" },="" _setvalue:="" function(="" value)="" {="" var="" o2="window.document.getElementById(" this.id);="" var="" o="o2.options;" if="" (="" this.multiple="" )="" {="" var="" values="value.split(" ",");="" var="" values_="{};" for(="" var="" i="0;" i="" />< values.length;="" i++)="" values_[values[i]]="true;" for(="" var="" i="0;" i="" />< o.length;="" i++)="" {="" o[i].selected="(" o[i].value="" in="" values_="" )="" }="" }="" else="" {="" for(="" var="" i="0;" i="" />< o.length;="" i++)="" {="" if="" (="" o[i].value="=" value="" )="" {="" o[i].selected="true;" break;="" }="" }="" }="" o2.onchange="" &&="" o2.onchange();="" }="" }="" ,="" "file":{="" _getvalue:="" function()="" {="" var="" res;="" var="" o="window.document.getElementById(" this.id);="" var="" is_d="isDisplayed(" this.id);="" if="" (="" this.ismultifile="" )="" {="" res="[];" if="" (="" is_d="" )="" {="" for(="" var="" i="0;" />0)?value[0]:""; o1.value = (value[1] && value[1]>0)?value[1]:""; o2.value = (value[2] && value[2]>0)?value[2]:""; } } };