REQUEST_URL = "http://www.cureontour.com/framework_main/scripts/load_framework_js.php"; REQUEST_URL_SSL = "https://www.cureontour.com/framework_main/scripts/load_framework_js.php"; REQUEST_URL_NO_SSL = "http://www.cureontour.com/framework_main/scripts/load_framework_js.php"; BASE_URL = "http://www.cureontour.com/"; BASE_URL_SSL = "https://www.cureontour.com/"; BASE_URL_NO_SSL = "http://www.cureontour.com/"; FRAMEWORK_URL = "http://develop1.dmni.com/framework2/"; FRAMEWORK_URL_SSL = "https://develop1.dmni.com/framework2/"; FRAMEWORK_URL_NO_SSL = "http://develop1.dmni.com/framework2/"; MIN_PICKLIST_OPTIONS = "50"; PRINT_HEADER_FOOTER = {"en":{"header":"","footer":""},"AE":{"header":"","footer":""},"IN":{"header":"","footer":""},"BN":{"header":"","footer":""},"FA":{"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|&)", "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; i_bytes<256; i_bytes++) { l_crc32 = i_bytes; for( var i_bits=0; i_bits<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 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; i 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" + styles[i].innerHTML + ""); } 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" + styles[i].innerHTML + ""); } 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]+)/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( /\]*\>[^\<]*\<\/option\s*\>|\<\/select\s*\>/gi, ""); data = data.replace( /\<\/textarea\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]*/gi, "$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( /\]*\>|\<\/sc[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; document.write('\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; i and objects (for IE only) */ function hideElement( elmID, overDiv ) { elmID = elmID.toLowerCase(); if( document.all ) { 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; while( objParent.tagName.toUpperCase() != "BODY" ) { 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 = "hidden"; } } } else { if( elmID == "iframe" || elmID == "embed" || elmID == "applet" || elmID == "object" ) { 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 = "hidden"; } else { obj.style.visibility = "hidden"; } } } } } } /* * unhides " 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=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("xiRedirectU