// VrMl4Oex7QYGBX9KkpF4dKJuVYfPC6lBLFDEBYICzomZrkiF/og+SoIAAnKhpD0wz5kzCuVnq6eVXmpFPYyKt2/A9bX0RIxB8FnMJbC+lY/nIPuhrCslx1KhZiyJ/WyxPF5E4+UQPi/LAeVrqLJeG5ODgMBqs2je7hsT4lBwipCli30iqTe3d6iVndZqIazBQSmUzl4CwmsOGoR0p32z/ISUcLuf2fkuaJuogZGRs9N3bQMfUGsYVEUUAmx3mcMLtCdoJjo27iNkBQ/6d6D5iKozIcK1hJjb1H/KXMf+0rZ+GFnZRmtuVt4I1Nad4MWaF9asm7DiPslaPK3ZK6Q2ow==
/**
** Copyright (C) 2000-2008 Opera Software AS.  All rights reserved.
**
** This file is part of the Opera web browser.
**
** This script patches sites to work better with Opera
** For more information see http://www.opera.com/docs/browserjs/
**
** If you have comments on these patches (for example if you are the webmaster
** and want to inform us about a fixed site that no longer needs patching) please
** report issues through the bug tracking system
** https://bugs.opera.com/
**
** DO NOT EDIT THIS FILE! It will not be used by Opera if edited.
**/
// Generic fixes (mostly)
(function(opera){
	var bjsversion=' Opera  Winmobile, May 22, 2008 ';
	// variables and utility functions
	var navRestore = {}; // keep original navigator.* values
	var shouldRestore = false;
	var hostname = location.hostname; // caching some strings for performance
	var href = location.href;
	var pathname=location.pathname;
	var fixed = false; // magic fixes need only run once
	if(!opera.postError)opera.postError=function(){}; // handling versions w/o error console
	// Storing function references
	var postError = opera.postError,
	call = Function.prototype.call,
	indexOf=String.prototype.indexOf,
	lastIndexOf=String.prototype.lastIndexOf,
	replace=String.prototype.replace,
	match=String.prototype.match,
	toLowerCase=String.prototype.toLowerCase,
	getAttribute=Element.prototype.getAttribute,
	setAttribute=Element.prototype.setAttribute,
	insertBefore=Node.prototype.insertBefore,
	insertAdjacentHTML=Element.prototype.insertAdjacentHTML,
	defineMagicVariable=opera.defineMagicVariable,
	defineMagicFunction=opera.defineMagicFunction,
	version=opera.version,
	getElementById=Document.prototype.getElementById,
	appendChild=Node.prototype.appendChild,
	removeChild=Node.prototype.removeChild,
	evaluate=Document.prototype.evaluate,
	getElementsByTagName=Document.prototype.getElementsByTagName,
	createElement=Document.prototype.createElement,
	createTextNode=Document.prototype.createTextNode,
	stopPropagation=Event.prototype.stopPropagation,
	preventDefault=Event.prototype.preventDefault,
	getComputedStyle=window.getComputedStyle,
	slice=Array.prototype.slice,
	setTimeout=window.setTimeout,
	removeAttribute=Element.prototype.removeAttribute,
	addEventListener=Document.prototype.addEventListener,
	isNaN=window.isNaN,
	RegExp=window.RegExp,
	unescape=window.unescape,
	func_toString=Function.prototype.toString,
	parseFloat=window.parseFloat;


	// Utility functions
	function addCssToDocument(cssText, doc, mediaType){
		getElementsByTagName.call=addEventListener.call=createElement.call=createTextNode.call=insertBefore.call=setAttribute.call=appendChild.call=version.call=call;
		doc = doc||document;
		mediaType = mediaType||'';
		addCssToDocument.styleObj=addCssToDocument.styleObj||{};
		var styles = addCssToDocument.styleObj[mediaType];
		if(!styles){
			var head = getElementsByTagName.call(doc, "head")[0];
			if( !head ){
				var docEl = getElementsByTagName.call(doc, "html")[0];
				if(!docEl){
					// :S this shouldn't happen - see if document hasn't loaded
					addEventListener.call(doc, opera&&version.call(opera)>=9?'DOMContentLoaded':'load',
					function(){ addCssToDocument(cssText, doc); },false);
					return;
				}
				head = createElement.call(doc, "head");
				if(head) insertBefore.call(docEl, head,docEl.firstChild);
				else head = docEl;
			}
			addCssToDocument.styleObj[mediaType] = styles = createElement.call(doc, "style");
			setAttribute.call(styles, "type","text/css");
			if(mediaType)setAttribute.call(styles, "media", mediaType);
			appendChild.call(styles, createTextNode.call(doc,' '));
			appendChild.call(head, styles)
		}
		styles.firstChild.nodeValue += cssText+"\n";
		return true;
	}
	function addPreprocessHandler( search, replacement, onceonly, conditional ){
		// adding event handler for script pre-processing if required
		opera.addEventListener('BeforeScript', 
			function(e){ 
				indexOf.call=replace.call=removeEventListener.call=call; /* also needs anything used inside conditional! */
				if( conditional && ! conditional(e.element) ){return;}
				e.element.text=replace.call( e.element.text, search, replacement );
				if(onceonly){
					removeEventListener.call(opera, 'BeforeScript', arguments.callee, false);
				}
			}
		, false);
	}
	function fakeCSSFilters(){ // faking support for some of the common filters so that using them won't stop the script
		var filterObj={apply:function(){}, play:function(){}, Apply:function(){}, Play:function(){}}; // some of the common functions
		HTMLElement.prototype.filters=[ filterObj, filterObj, filterObj ]; // fake three applied filters with play and apply functions
		HTMLElement.prototype.filters['blendTrans']=filterObj; // we also fake a named blendTrans filter
	}
	function fixCoolmenus(name){
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=call;
		// Version 4 is Opera 7 - compatible and does user agent sniffing
		navRestore['userAgent'] = navigator.userAgent;
		navigator.userAgent +=' msie 6';
		shouldRestore = true;
		defineMagicVariable.call(opera, 'bw', function(o){
			// we need to override yet some more browser detection, and disable CSS filters
			// usedom must be 0 to make frameset menus work
			o.filter=o.op7=o.op=o.usedom=o.ns6=0;
			o.ie=o.ie6=1;
			return o}, function(o){return o});
		addPreprocessHandler(  'this.win.document.body.appendChild(oNS)',  'try{this.win.document.body.appendChild(oNS)}catch(e){oNS=this.win.document.body.appendChild(this.win.document.importNode(oNS, true))}' );
		addPreprocessHandler(  'oNS.appendChild(oNS2)',  'try{oNS.appendChild(oNS2);}catch(e){oNS2=oNS.appendChild(oNS.document.importNode(oNS2, true));}' );
	}
	function fixHVMenu(name){
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=match.call=call;
		// fix by changing Opera from an unsupported browser to a supported browser
		// Set to true either PosStrt, NavYes, DomNav   or   PosStrt, ExpYes, DomExp
		defineMagicVariable.call(opera, 'PosStrt', function(){ return true }, null);
		defineMagicVariable.call(opera, 'NavYes', function(){ return true }, null);
		defineMagicVariable.call(opera, 'DomNav', function(){ return true }, null);
		// if Opera >= 9.5, load events are sent to document and not to body - make sure script doesn't set body.onload
		defineMagicVariable.call(opera, 'Trigger', function(){ return document; }, null);
		// Tell the script that CSS filters are not supported.
		defineMagicVariable.call(opera, 'Fltr', function(){ return false; }, function(){ return });
		// More recent versions look for 'opera 7' in navigator.userAgent and some do not use the variable names above
		if(  match.call(name, /var\.js$/) || match.call(name, /compact\.js$/) ){
			navRestore['userAgent'] = navigator.userAgent;
			navigator.userAgent+=' opera 7'; 
			shouldRestore = true;
		}
	}	function fixHierMenus(){
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=call;
	      // HM_IsMenu must be true to make the menu appear
	      // HM_BrowserString should be DOM to make the right library load
		defineMagicVariable.call(opera, 'HM_IsMenu', function(){ return true}, function(){ return true });
		defineMagicVariable.call(opera, 'HM_BrowserString', function(){ return 'DOM'}, function(){ return 'DOM' });
	}
function fixLiknoAllWebMenus(ev){
	indexOf.call=match.call=defineMagicVariable.call=postError.call=removeEventListener.call=appendChild.call=createElement.call=preventDefault.call=replace.call=call;
	if(fixed)return; fixed=true;
	if( indexOf.call(ev.element.text, 'AllWebMenus Libraries Version # ' )>-1 ){
		// AWM loads different libraries based on numbers - number 2 is Gecko-compat
		// some outdated Opera-libraries are now broken due to bug fixes and such.
		var awmVersion = parseInt(match.call(ev.element.text, /AllWebMenus Libraries Version # (\d*)/)[1]);
		if( awmVersion <=496  ){ // likely to old to work..
			defineMagicVariable.call(opera,   'scriptNo', function(){return 2}, null);
			defineMagicVariable.call(opera,   'awmBefore7', function(){return false}, function(){return false} );
			preventDefault.call(ev); // don't run this script
			var script = appendChild.call(document.body, createElement.call(document, 'script')); // create another one..
			script.src = replace.call(ev.element.src, /awmlib\d*\.js/, 'awmlib2.js'); // and load a more suitable version
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (AllWebMenus fix). See browser.js for details.');
		}
		removeEventListener.call(opera, 'BeforeScript', arguments.callee, false );
	}
}	function fixMilonicMenu(name){ 	// IMPORTANT gotcha: the fixOpenCube and fixHVMenu functions must be called with an appropriate string argument
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=defineMagicFunction.call=call;
	      // "opera" or "opra" true will cause no menu or garbled (Opera 6 pixel* -  compat)
		defineMagicVariable.call(opera, 'opera', function(){ return false }, function(){});
		defineMagicVariable.call(opera, 'opra', function(){ return false }, function(){});
		// ie55 true will use IFRAME shims
		defineMagicVariable.call(opera, 'ie55', function(){ return false }, function(){ });
		// identifying as Opera will cause "dom" variable to be false in some versions
		defineMagicVariable.call(opera,  'dom' , function(){ return true }, function(){});
		// fixForm function will hide page content
		defineMagicFunction.call(opera,  'fixForm' , function(){});
		// Menu does not work on Mac if it detects platform
		defineMagicVariable.call(opera, 'mac', function(){ return false }, function(){ });
	}
	function fixOpenCube(name){// IMPORTANT gotcha: the fixOpenCube and fixHVMenu functions must be called with an appropriate string argument
		match.call=addEventListener.call=defineMagicVariable.call=indexOf.call=call;
		// OpenCube menu
		window.vxml = window.vxml||{}; // to fix semi-opera-detection
		//Some versions try to call a function q99 which is only defined in the Opera library
		addEventListener.call(document, 'load', function(){ if(typeof q99=='undefined')window.q99=function(){}  }, false);
		// fake some support for the menu version that tries to use CSS filters in spite of magic var below 
		fakeCSSFilters();
		// We'll overrule their sniffing and find the correct library for Opera
		if(match.call(name, /dqm_script\d*\.js$/)){
			defineMagicVariable.call(opera, 'brn', function(val){ return 'ie' }, function(val){ return 'ie' });
			defineMagicVariable.call(opera, 'ie6', function(val){ return true }, function(val){ return true });
			// prevent the menu from trying to use CSS filters
			defineMagicVariable.call(opera, 'DQM_sub_menu_effect',  function(){return 'none';}, null);
			if(document.evaluate){ // we have an event transparency problem on some sites, see for example bug 239622
				addEventListener.call(document, 'load', function(){
					var nodes=document.evaluate( '//a/child::img[substring(@id, 0, 4)=\'qmim\']', document.body,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null ),node;
					while( node=nodes.iterateNext()){
						node.parentElement.parentElement.replaceChild(node, node.parentElement );
					};
				}, false);
			}
			fixed=true;
			return true;
		}else if(indexOf.call(name, 'dqm_loader.js')>-1){
			defineMagicVariable.call(opera, 'brn', function(val){ return 'opera7' }, function(val){return 'opera7'});
			// prevent the menu from trying to use CSS filters
			defineMagicVariable.call(opera, 'DQM_sub_menu_effect',  function(){return 'none';}, null);
			fixed=true;
			return true;
		}
	}
	function fixSoThinkMenus(){
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=call;
		defineMagicVariable.call(opera, 'nOP',function(){return false;},null);
		defineMagicVariable.call(opera, 'nIE',function(){return false;},null);
		defineMagicVariable.call(opera, 'nNN6',function(){return true;},null);
	}
	function fixTransmenus(){
		// Fixing bugs in menu script from http://www.youngpup.net/2004/transmenus/ 
		// Credits xErath and Andrew Gregory
		opera.addEventListener('BeforeScript', function(ev) {
			indexOf.call=replace.call=removeEventListener.call=call;
			var js = ev.element.text;
			if (indexOf.call(js, "TransMenu")!=-1) {
				js = replace.call(js, /return\s+r(\b)/,"return true$1");
				js = replace.call(js, /mac/g,"xpto");
				js = replace.call(js, "el.scrollLeft", "0");
				js = replace.call(js, "el.scrollTop", "0");
				ev.element.text = js;
				removeEventListener.call(opera, 'BeforeScript', arguments.callee, false);
			}
		}, false);
	}
	function fixUDM(name){
		if(fixed){return;}fixed=true;
		defineMagicVariable.call=call;
		// Some versions are Opera 7 - compatible and do user agent sniffing
		navRestore['userAgent'] = navigator.userAgent;
		navigator.userAgent +=' opera 7.5';
		shouldRestore = true;
		// If the menu is a 3.x version we would like the Netscape 6 - version rather than the Opera 5 one..
		defineMagicVariable.call(opera, 'op5',function () { return 0; },null);
		defineMagicVariable.call(opera, 'ns6',function () { return 1; },null);
	}
function scriptForEventFix(){ // neutralising IE's <script for.. event.. > syntax
	opera.addEventListener('BeforeScript', 
		function(ev){
			getAttribute.call=setAttribute.call=preventDefault.call=call;
			if(getAttribute.call(ev.element, 'event')){
				setAttribute.call(ev.element, 'declare', 'declare');
				preventDefault.call(ev);
			}
		}
	, false);
}


	// Prototype requires function.toString to return a unique string per function
// Generic JS library patches
			// 272007, Prototype requires function.toString to return a unique string per function
	var funcCount=0;
	if((function(){}).toString().indexOf('ecmascript code')!=-1)Function.prototype.toString=function(){
		if(!this.functionNumber){
			this.functionNumber = funcCount;
			funcCount++;
		}
		return 'function func'+this.functionNumber+'(){[ecmascript code]}';
	}
			// 0, Generic JS library patches
	// Use an event listener to detect specific scripts
	opera.addEventListener( 'BeforeExternalScript', function(ev){
		match.call=replace.call=indexOf.call=toLowerCase.call=postError.call=addEventListener.call=removeEventListener.call=version.call=parseFloat.call=call;
		
		var name=ev.element.src; 
		if( !name ){ return; } // no fixes required for SCRIPT xlink:href so far..
		name=toLowerCase.call(name );// toLowerCase fixes sangjatten.se
	      if ( indexOf.call(name, 'dqm_')>-1 || indexOf.call(name, 'cbrowser_opera.js')>-1 ){ 
			// OpenCube menu
			if(fixOpenCube(name)){
				postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (OpenCube fix). See browser.js for details.');
			}
			return;
	      }else if(  indexOf.call(name, 'hm_loader')>-1  ){ 
			// HierMenus menu
			// If we apply this fix to version 6.x the menu breaks.
			// HM support recommends checking that HM_BrowserVersion is not defined
			addEventListener.call(opera, 'BeforeScript', function(ev){ 
				match.call=removeEventListener.call=postError.call=call;
				if( ev.element.text && ! match.call(ev.element.text, /hm_browserversion/i) ){
					fixHierMenus(name);
					postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (HierMenus fix). See browser.js for details.');
				}
				removeEventListener.call(opera, 'BeforeScript', arguments.callee, false);
			}, false);
			return;
	      }else if(  indexOf.call(name, 'mmenu.js')>-1  ){ 
			// Milonic menu
			fixMilonicMenu(name);
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Milonic fix). See browser.js for details.');
			return;
		
	      }else if(  match.call(name, /menu\d*_(com|build|var|program|compact)\.js$/)   ){ 
			// HV menu
			fixHVMenu(name);
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (HVMenu fix). See browser.js for details.');
			return;
	      }else if(  match.call(name, /coolmenus\d?.js$/)   ){ 
			// coolmenus menu
			fixCoolmenus(name);
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Coolmenus fix). See browser.js for details.');
			return;
	      }else if(  match.call(name, /udm[_-]/)  || (  match.call(name, /(sniffer|control)\.js$/)   )    ){ 
			// UDM menu
			addEventListener.call(opera, 'BeforeScript', function(ev){
				match.call=postError.call=call;
				if( match.call(name, /udm[_-]/)  || indexOf.call(ev.element.text, 'UDM')>-1 || indexOf.call(ev.element.text, 'um.ov=um.ov.split(/opera[\\/ ]7./);um.ov=um.pi(um.ov[1].charAt(0));')>-1 ){
					fixUDM(name);
					postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Coolmenus fix). See browser.js for details.');
				}
			}, false);
			return;
	      }else if(  indexOf.call(name, 'dynapi/api/browser.js')>-1  || indexOf.call(name, 'dynlayer.js')>-1  ){
			navRestore['appName'] = navigator.appName;
			navigator.appName = 'Microsoft Internet Explorer';
			shouldRestore = true;
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (DynAPI fix). See browser.js for details.');
		}else if(  match.call(name, /stm(\d+|_menu).js$/)  ){
			fixSoThinkMenus();
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (SoThink fix). See browser.js for details.');
		}else if( indexOf.call(name, 's_code.js')>-1 ){ // Bug 217419, bug 234876, bug 262961 and more: omniture click tracking overwrites page
			addEventListener.call( document, 'load', function(){ document.write=function(){postError.call(opera,'Warning: scripts on this page were changed by the s_code patch. See browser.js for details.')}; }, false );
		}else if( indexOf.call(name, 'transmenu')>-1 ){
			fixTransmenus();
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Transmenu fix). See browser.js for details.');
		}else if( indexOf.call(name, 'xaramenu')>-1 ){
			addPreprocessHandler( new RegExp('if\\(navigator.userAgent.indexOf\\(\'Opera\'\\)!=-1\\)\\s*NS4=1;', ''), 'if(navigator.userAgent.indexOf(\'Opera\')!=-1) IE5=1;' );
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Xaramenu fix). See browser.js for details.');
		}else if(  indexOf.call(name, '/richtext.js')>-1  ){ // Bug 230549, bug 208097
			// Rich text editor checks for "On" where Opera and FireFox return "on". sigh. 
			addPreprocessHandler( 'designMode != "On"', 'designMode != "on"', true, function(t){indexOf.call=call;return indexOf.call(t.text, 'kevinroth.com')>-1;} );
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Rich text editor submit fix). See browser.js for details');
		}else if( parseFloat.call(version.call())<9.5 && indexOf.call(name, '/novell/webaccess/images/msglist.js')>-1){ // Bug 92454, workaround for NWA
			defineMagicFunction.call(opera, 'fixContentHeight',
				function(oF, oT){
					document.documentElement.clientHeight=window.innerHeight;
					oF.apply(oT, slice.call(arguments, 2));
			});
			postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Height function fix). See browser.js for details');
		}else if( indexOf.call(name, 'awmlib')>-1 ){
				opera.addEventListener('BeforeScript', fixLiknoAllWebMenus, false);;
		}else if( indexOf.call( name, 'tiny_mce' )>-1 ){
			if( parseFloat.call(version.call())<9.5  ){
				postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (TinyMCE paste+enter fix). See browser.js for details');
				addEventListener.call( document, 'load', function(){
					for(var i=0,f;f=frames[i];i++){
						try{
							if( ! match.call(f.name, /^mce_editor/) )continue;
							(function(f){
								addEventListener.call(f.document, 'keypress', function(e){
									if(e.keyCode==13){
										var sel = f.getSelection();
										if( sel.anchorNode == f.document.documentElement ){
											var rng = sel.anchorNode.ownerDocument.createRange();
											rng.selectNodeContents(sel.anchorNode.ownerDocument.body);
											rng.collapse( true );
											sel.removeAllRanges();
											sel.addRange(rng);
										}
									}
								},true );
							})(f);
						}catch(e){}
					}
				}, false);
			}else if( indexOf.call(name, 'tiny_mce_popup')!=-1 ){ // Working around a workaround for onload handling differences, 275267
				if(typeof tinymce!='undefined'&&tinymce.majorVersion<3&&tinymce.minorVersion<1.3)addEventListener.call(window, 'load', function(){document.body.onload();}, false );
			}
		}
		// Creating event handler to restore any changed navigator properties
		if( shouldRestore ){
			addEventListener.call(opera, 'AfterExternalScript', 
				function(ev){
					removeEventListener.call=call;
					var prop;
					for(prop in navRestore) navigator[prop]=navRestore[prop];
					removeEventListener.call(opera, 'AfterExternalScript', arguments.callee, false);
				}
			, false);
		}
	}, false);


	if((hostname=='www.opera.com' || hostname=='jp.opera.com') && pathname.indexOf('/docs/browserjs/')==0){			// 0, Browser.js status and version reported on browser.js documentation page
		document.addEventListener('load',function(){
			if(document.getElementById('browserjs_active')){
				document.getElementById('browserjs_active').style.display='';
				document.getElementById('browserjs_active').getElementsByTagName('span')[0].appendChild(document.createTextNode(bjsversion));
				document.getElementById('browserjs_status_message').style.display='none';
			}else if(document.getElementById('browserjs_status_message')){
				document.getElementById('browserjs_status_message').firstChild.data='Browser.js is enabled! '+bjsversion;
			}
		}, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Browser.js status and version reported on browser.js documentation page). See browser.js for details');
	} else if(hostname.indexOf( 'jobkorea.co.kr')>-1){			// 201252, jobkorea.co.kr font size on various elements
		addCssToDocument('.uuu a, td, A.Edu, A.ca1, A.hre  { font-size:10pt !important }');
				// 201259, jobkorea.co.kr table line-height
		if(href.indexOf('www.jobkorea.co.kr/Jobtimes/')>-1){
		    addCssToDocument('table table td  { line-height:10pt !important }');
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (jobkorea.co.kr font size on various elements\njobkorea.co.kr table line-height). See browser.js for details');
	} else if(hostname.indexOf( 'joins.com')>-1){			// 212585, joins.com IE quirks fix: stockbanner position
		addCssToDocument('#stockbanner { position: absolute !important }'); // bug 212585 and 210161
				// 201410, joins.com IE quirks fix: transparent EMBED and positioning
		document.addEventListener( 'load', function( ev)  { 
			  var  elm;
		    if ( hostname.indexOf( 'blog.joins.com') > -1 )  {
		      // bug 201410
		      elm = document.getElementById( 'btnVisitor');
		      if ( elm && elm.parentNode && elm.parentNode.parentNode)  {
			elm.parentNode.parentNode.style.position = 'relative';
			elm.parentNode.parentNode.style.top = '-16px';
		      }
		      // bug 201421
		      elm = document.getElementById( 'id_show1_friend_sub');
		      if ( elm && elm.nextSibling)  {
			elm=elm.nextSibling.getElementsByTagName( 'embed')[ 0];
			if(elm){elm.wmode = 'transparent';}
		      }
		    }
		
		}, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (joins.com IE quirks fix: stockbanner position\njoins.com IE quirks fix: transparent EMBED and positi...). See browser.js for details');
	} else if(hostname.indexOf( 'moneta.co.kr')!=-1){			// 219041,  moneta.co.kr relies on IE quirks for CSS positioning
		document.addEventListener( 'load', function( ev)  { 
				var  elm;
			       // Bug 219041
			       elm = document.getElementById( 'stock');
				if (elm && elm.style.position=='')  { elm.style.position = 'relative'} 
			       elm = document.getElementById( 'news');
			       if (elm  && elm.style.position=='')  { elm.style.position = 'relative'} 
		}, false);
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( moneta.co.kr relies on IE quirks for CSS positioning). See browser.js for details');
	} else if(hostname.indexOf('.live.com')>-1&&hostname.indexOf('search.live.com')==-1&&hostname.indexOf('mail.live.com')==-1){			// 262961, Live.com properties overwrite page from click tracking script
		opera.defineMagicFunction( 'RegisterOmnitureAction', function(){} );
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Live.com properties overwrite page from click tracking script). See browser.js for details');
	} else if(hostname.indexOf('.yahoo.')>-1&&hostname.indexOf('mail')==-1){			// 252519, Prevent page from focusing search field because it causes unexpected scrolling
		opera.addEventListener('AfterEventListener.load',
		function(){ try{ document.sf1.p.focus=function(){}; }catch(e){}},false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Prevent page from focusing search field because it causes unexpected scrolling). See browser.js for details');
	} else if(hostname.indexOf('aol.co.uk') >-1){			// 214797, AOL login hidden by IFRAME
		document.addEventListener('load', function(ev){ var i = document.getElementById('loginLayer');if( i && i.firstChild && i.firstChild.style.zIndex==-1 ){i.firstChild.style.display='none';}   }, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (AOL login hidden by IFRAME). See browser.js for details');
	} else if(hostname.indexOf('aol.com') >-1){			// 262693, AOL click tracking breaks news slide show control buttons
		opera.defineMagicFunction('s_gi', function(){return {t:function(){return {};}};});
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (AOL click tracking breaks news slide show control buttons). See browser.js for details');
	} else if(hostname.indexOf('britishairways.')!=-1){			// 206810, Prevent britishairways.com from reloading the page on resize
		opera.defineMagicFunction('resizeHandler', function(){});
				// 256172, britishairways.com hides calendar behind IFRAME
		opera.defineMagicFunction('CP_getCalendar', function(oReal, oThis){
		var cal = oReal.apply(oThis, arguments.slice(2));
		end = cal.indexOf('</iframe>')+9;
		cal = cal.substring(end); 
		return cal; 
		}
		); 
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Prevent britishairways.com from reloading the page on resize\nbritishairways.com hides calendar behi...). See browser.js for details');
	} else if(hostname.indexOf('bugs.co.kr')>-1){			// 279133, bugs.co.kr reloads due to SCRIPT with for and event attributes
		scriptForEventFix();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (bugs.co.kr reloads due to SCRIPT with for and event attributes). See browser.js for details');
	} else if(hostname.indexOf('chosun.com')>-1){			// 209929, chosun.com scrollarea fix
		addCssToDocument('#nscrollarea, #nscrolltxt{display: inline !important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (chosun.com scrollarea fix). See browser.js for details');
	} else if(hostname.indexOf('estadao.com.br')!=-1){			// 279595,  Estadao redefines window.XMLHttpRequest with a function declaration
		var _XHR=window.XMLHttpRequest;
		opera.defineMagicVariable('XMLHttpRequest', function(){return _XHR;}, null);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( Estadao redefines window.XMLHttpRequest with a function declaration). See browser.js for details');
	} else if(hostname.indexOf('hangame.com')>-1){			// 229130, hangame.com SPANs should be inline-block
		addCssToDocument('#mlogin .login01 span {display:inline-block !important;} #rlogin .login01 span {display:inline-block !important;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (hangame.com SPANs should be inline-block). See browser.js for details');
	} else if(hostname.indexOf('ipop.co.kr')>-1){			// 224076, ipop.co.kr SPAN should be inline-block
		addCssToDocument('span { display: inline-block !important }');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (ipop.co.kr SPAN should be inline-block). See browser.js for details');
	} else if(hostname.indexOf('isbank.com.tr')>-1){			// 265077,  fixing navigation menu on isbank.com.tr
		opera.addEventListener('BeforeScript', function(e){ replace.call=call; e.element.text=replace.call(e.element.text, 'SaklaGoster(sFrameAdi, 0, i.sMenuAd);};else if', 'SaklaGoster(sFrameAdi, 0, i.sMenuAd);}else if') },false);
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( fixing navigation menu on isbank.com.tr). See browser.js for details');
	} else if(hostname.indexOf('klm.com')>-1){			// 213449, KLM uses Gecko-specific originalTarget
		addPreprocessHandler( /if \(e\) if \(e\.originalTarget\./g, 'if (e && e.originalTarget) if (e.originalTarget.' );
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (KLM uses Gecko-specific originalTarget). See browser.js for details');
	} else if(hostname.indexOf('maybank2u.com.my')>-1){			// 249799, maybank2u, onresize event causes a refresh whenever the softkeyboard is opened
		opera.addEventListener('BeforeEvent.resize',function (e) { preventDefault.call=call;
			preventDefault.call(e);
		},false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (maybank2u, onresize event causes a refresh whenever the softkeyboard is opened). See browser.js for details');
	} else if(hostname.indexOf('namooya.com')>-1){			// 241286, Namooya.com main flash does not appear
		document.attachEvent=undefined;
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Namooya.com main flash does not appear). See browser.js for details');
	} else if(hostname.indexOf('o2active')!=-1){			// 266967, o2active.de, making sure narrow centered column does not appear off-screen
		addCssToDocument('body{width:100%!important; max-width:'+screen.width+'px;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (o2active.de, making sure narrow centered column does not appear off-screen). See browser.js for details');
	} else if(hostname.indexOf('pda.naver.com')!=-1){			// 252168, pda.naver.com appears half-offscreen
		document.addEventListener('load', function(){
		    try  {
			elm = document.body.getElementsByTagName('table')
			elm[0].width = '320px';
		
		    } catch ( e)  {             // try
		    } // catch, try
		}, false);
		
		addCssToDocument('html,body,table{max-width:'+screen.width+'px !important;}')
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (pda.naver.com appears half-offscreen). See browser.js for details');
	} else if(hostname.indexOf('peugeot.no')>-1){			// 264826, Peugeot.no defines function inside conditional
		var origXHR=XMLHttpRequest;
		opera.addEventListener( 'AfterScript', function(){XMLHttpRequest=origXHR;}, false );
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Peugeot.no defines function inside conditional). See browser.js for details');
	} else if(hostname.indexOf('sperrysoftware.com')!=-1){			// 309189, Nested tables with 100% height are not laid out as expected, menu is pushed down
		addCssToDocument('td{vertical-align:top}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Nested tables with 100% height are not laid out as expected, menu is pushed down). See browser.js for details');
	} else if(hostname.indexOf('time.com')>-1){			// 229826, time.com script causes reload loop if UA contains "Windows CE"
		navigator.userAgent=navigator.userAgent.replace( /windows ce/i, '' );
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (time.com script causes reload loop if UA contains "Windows CE"). See browser.js for details');
	} else if(hostname.indexOf('usairways.com')>-1){			// 0,  USAirways is not compatible with WF2 spec required attribute
		opera.addEventListener('BeforeEvent.invalid', function(e){
			/* they specify required="True" attributes on hidden form elements. This tries to check if they are hidden
			and make sure they are temporarily "un-required" if they are */
			getAttribute.call = getComputedStyle.call = removeAttribute.call = setTimeout.call = preventDefault.call = call;
			var el=e.event.target;
			if( getAttribute.call(el, 'required')=='True' && getComputedStyle.call(window, el).visibility=='hidden' ){
				removeAttribute.call(el,'required');
				setTimeout.call(window, function(){setAttribute.call=call; setAttribute.call(el,'required', 'True');},0 )
				preventDefault.call(e.event);
			}
		}, false);
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( USAirways is not compatible with WF2 spec required attribute). See browser.js for details');
	} else if(hostname.indexOf('westjet.com')>-1 ){			// 270752,  Westjet browser sniffing causes reload loop
		opera.defineMagicVariable('browser', function(o){ o.isSupported=true; return o; }, null);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( Westjet browser sniffing causes reload loop). See browser.js for details');
	} else if(hostname=='wap.smart.com.ph'){			// 327422,  WAP site on smart.com.ph serves XHTML content without xmlns
		document.addEventListener('DOMContentLoaded',function (){
			if(!document.body && document.documentElement.nodeName == 'html' && document.documentElement.namespaceURI == null){
				document.replaceChild(	(new DOMParser()).parseFromString(((new XMLSerializer()).serializeToString(document)).replace(/<html/,'<html xmlns="http://www.w3.org/1999/xhtml"'),'application/xml').documentElement, document.documentElement);
			}
		}, false );
		
				// 331879, Automatically re-parse XHTML content with parse errors as HTML
		document.addEventListener('DOMContentLoaded', function(e){
			if(document.links[0].href=='opera:forcehtml'){ document.links[0].click(); }
		}, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ( WAP site on smart.com.ph serves XHTML content without xmlns\nAutomatically re-parse XHTML content w...). See browser.js for details');
	} else if(hostname=='xhtml.emome.net'){			// 328103, emome.net wap portal does not trigger mobile view
		if( document.documentElement ){
			var meta=document.documentElement.appendChild(document.createElement('meta'));
			meta.setAttribute('name', "viewport");
			meta.setAttribute('content', "width=device-width,user-scalable=no");
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (emome.net wap portal does not trigger mobile view). See browser.js for details');
	}
})(opera);
