// J5wEg8r4gavSUzDqGedskQxFWtYInQVoXpxxv3IHHzug598pz36OCLy5jrvKhqxWgef25I18SdZPtwDgsu0vfKRG3XDByq6eSXs67bNLDVeYQosqiRMFHI+7WRx/eedAFrWFpQIKivdse5qKjiZASbxk2hqlI1gb5cCCFGyj9FWkFyUTtCvjgmeOkYYKzAjC0krYyYFEBUQIlBy5UQa+ISKTowHHM9JUEDUfi8I1BNqkFtvz3Z3hbmmIUfIpY+s6zstD93f5z0yF8Pe4lY5QfADDrvur5FIPMlz7QWtewwlgY5u/p2dWE7FuAeL4Lf7oVRpvPm7EGNwr8+kP72DwcQ==
/**
** Copyright (C) 2000-2009 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  9.50, Winmobile, September 10, 2009 ';
	// 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,
	replaceChild=Node.prototype.replaceChild,
	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,
	shift=Array.prototype.shift,
	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;
	var opera_version = parseFloat.call(window,opera.version());

	// 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 avoidDocumentWriteAbuse(contentRegexp){
	var dw=document.write;
	contentRegexp = contentRegexp || /(^<img .*?width=("|)1("|)\s+height=("|)1("|)\s+border=("|)0("|)\s+alt="".*?>$|^\[object Object\]$)/i;
	document.write=function( s ){
		if( String(s).match( contentRegexp ) ){
			opera.postError('Warning: scripts on '+window.location+' were changed by the s_code patch. See browser.js for details.');
		}else{//opera.postError(arguments);
			dw.apply(document, arguments);
		}
	};
}function forceMobileView(){
if( document.documentElement ){
	var meta=document.documentElement.appendChild(document.createElement('meta'));
	meta.setAttribute('name', "viewport");
	meta.setAttribute('content', "width=device-width,user-scalable=no");
}}
function forceWordWrapping(wrapTargets) {
    var wrapElements = wrapTargets||'div, span, p, li, a, td, th';
    opera.postError('Warning: Browser has forced word wrapping for certain elements.');
    addCssToDocument(wrapElements + '{ white-space: -o-pre-wrap !important; }')
}function prepareFakeDesignMode(){
	document.addEventListener('load', function(e){
		try{
		if( e.target.tagName == 'IFRAME' ){
			// avoid security policy problems when document.domain is set
			if(hostname!=document.domain){
				var crossDomainPolicyBug=false;
				try{
					e.target.contentDocument.body;
				}catch(e){
					crossDomainPolicyBug=true;
				}
			    if(e.target.src=='' && crossDomainPolicyBug){
				e.target.src='data:text/html,"<script>document.domain=\''+document.domain+'\';</script>"';
			    }
			}
			if( e.target.contentDocument.designMode=='on' ){
				fakeDesignMode(e.target.contentDocument);
			}
			e.target.contentDocument.__defineSetter__('designMode', function(v){
				if(/on/i.test(v)){
					fakeDesignMode(this);
				}
			});
		}
		}catch(e){ opera.postError(e); }
		function fakeDesignMode(doc){
			var txt=doc.body.appendChild(doc.createElement('textarea'));
			txt.setAttribute('style', 'width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0')
			doc.body.style.overflow='hidden';
			txt.value=doc.body.innerText;
			doc.execCommand=function(){};
			doc.body.__defineGetter__('innerHTML', function(){ return txt.value.replace(/\n/g, '<br>\n'); });
			doc.body.__defineSetter__('innerHTML', function(v){ txt.value=v.replace(/<[^<]+>/g, ' ').replace( / {2,}/,' ' ); });
			doc.documentElement.__defineGetter__('innerHTML', function(){ return txt.value.replace(/\n/g, '<br>\n'); });
			doc.documentElement.__defineSetter__('innerHTML', function(v){ txt.value=v.replace(/<[^<]+>/g, ' ').replace( / {2,}/,' ' ); });
			doc.body.__defineGetter__('innerText', function(){ return txt.value; });
			doc.open=doc.defaultView.focus=function(){txt.focus();};
			doc.write=function(){
				txt.value=arguments.join('').replace(/<style.*\/style>/ig, '').replace(/<[^>]*>/g, ' ').replace(/&quot;/g, '"').replace(/\s{1,}/g, ' ');
			};
		}
	}, true);
}function scaleImagesToScreenWidth(maxWidth) {
    var max = maxWidth || screen.width;
    addCssToDocument('img { max-width: ' + max + 'px !important; height: auto !important; }');
    opera.postError('Warning: Image resized to screen width by browser. See browser.js for details.');
}
//SELECT * FROM patches, patch_information WHERE patches.patch_id = patch_information.patch_id AND patch_information.platform LIKE "winmobile" AND (patch_information.obsolete_from LIKE "0.00" OR patch_information.obsolete_from > "9.50") AND patch_information.requires_version <= "9.50" AND patches.active LIKE "1" AND patches.looks_safe LIKE "1" AND  patches.parent = 633 AND patch_information.review_status LIKE 'ACCEPTED' ORDER BY patches.if_clause
//SELECT * FROM patches, patch_information WHERE patches.patch_id = patch_information.patch_id AND patch_information.platform LIKE "winmobile" AND (patch_information.obsolete_from LIKE "0.00" OR patch_information.obsolete_from > "9.50") AND patch_information.requires_version <= "9.50" AND patches.active LIKE "1" AND patches.looks_safe LIKE "1" AND  patches.parent = 695 AND patch_information.review_status LIKE 'ACCEPTED' ORDER BY patches.if_clause

	// Prototype requires function.toString to return a unique string per function
// Compatibility layer for Google Gears initialization script
// Generic patches (Windows mobile)
// Make sure plugin sniffers detect the correct Flash API version
			// 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]}';
	}
			// 347496, Compatibility layer for Google Gears initialization script
	if (window.opera && opera.createWorkerPool && 
	    navigator.mimeTypes["application/x-googlegears"] &&
	    navigator.mimeTypes["application/x-googlegears"].enabledPlugin
	    ){
		window.GearsFactory = function()
		{
		    var element = document.createElement("object");
		    element.setAttribute('style', 'display:block;width:1px;height:1px;position:absolute;left:-2px');
		    element.type = "application/x-googlegears";
	 
		    document.documentElement.insertBefore(element,
							  document.documentElement.firstChild);
		    element.getBuildInfo(); // to make sure init is complete
		    return element;
		}
	}
			// 0, Generic patches (Windows mobile)
	// 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,'s_code')>-1||indexOf.call(name,'omniture')>-1){//PATCH-59
			avoidDocumentWriteAbuse();
		}if(indexOf.call(name, 'zshare.net/videoplayer/js/PlayerFunctions.js')>-1){ // SOKRI4-1002
			opera.defineMagicFunction( 'hide_ad', function( rf, rt ){
				if( document.player )document.player.style.visibility='visible';
				return rf.apply(rt, arguments.slice(2)) }
			);
			opera.defineMagicFunction( 'show_ad', function( rf, rt ){
				if( document.player )document.player.style.visibility='hidden';
				return rf.apply(rt, arguments.slice(2)) }
			);
		}
	}, false);
			// PATCH-4, Make sure plugin sniffers detect the correct Flash API version
	if( opera.flashPluginAX && opera.flashPluginAX() && Object.prototype.__defineGetter__ ){
		var origPluginGetter = navigator.__lookupGetter__('plugins');
		navigator.__defineGetter__('plugins', function(){
			try{
				new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
				return undefined;
			}catch(e){
				return origPluginGetter.call(this);
			}
		});
	};


	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((parseFloat(opera.version())>9?'DOMContentLoaded':'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( 'bbc.co.uk' )!=-1 && pathname.match( /^\/mobile\// )){			// TWEETY-118, Mobile BBC should default to mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile BBC should default to mobile view). See browser.js for details');
	} else if(hostname.indexOf( 'windowsmedia.com' )!=-1 && pathname.match( /^\/mobile\// )){			// OSAN-91, Mobile Windowsmedia site does not trigger mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile Windowsmedia site does not trigger mobile view). See browser.js for details');
	} else if(hostname.indexOf("lotteimall.com")>-1){			// SEOUL-607, fixes a spurious alert on lotteimall.com
		var old_alert = alert;
		
		window.alert = function(e) {
		  if(e.indexOf('flashVer=') == -1) {
		    old_alert(e);
		  }
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (fixes a spurious alert on lotteimall.com). See browser.js for details');
	} else if(hostname.indexOf('.aol.') >-1){			// 0, AOL
		/* AOL */
	
	
		if(hostname.indexOf('aol.com') >-1){			// PIONER-198, AOL browser sniffing causes missing styling
			document.addEventListener('DOMContentLoaded', function(){document.documentElement.className='SAF';}, false);
				if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (AOL browser sniffing causes missing styling). See browser.js for details');
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (AOL). See browser.js for details');
	} else if(hostname.indexOf('.google.')>-1&&pathname.indexOf('/m')==0&&pathname.indexOf('mail')==-1){			// SOKRI3-1403, Google navigation bar overlaps if localised text is too long
		addCssToDocument('.navbar { height: auto; !important; }');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Google navigation bar overlaps if localised text is too long). See browser.js for details');
	} else if(hostname.indexOf('.yahoo.')>-1){			// 0, Yahoo!
		/* Yahoo! */
	
	
		if(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');
		}
		if(hostname.indexOf('mail.yahoo.')!=-1){			// UMAFINAL-1264, Fake designmode for Yahoo mail
			prepareFakeDesignMode();
				if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Fake designmode for Yahoo mail). See browser.js for details');
		}
		if(hostname.indexOf('tw.stock.yahoo')>-1){			// HMONY-1180, Remove a scrolling ad on tw.stock.yahoo.com - freezes most low-CPU devices
			opera.defineMagicVariable('yh_floater', function(){},null);
				if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Remove a scrolling ad on tw.stock.yahoo.com - freezes most low-CPU devices). See browser.js for details');
		}
		if(hostname=='new.m.yahoo.com'){			// OSAN2-281, Banner image goes over screen width on new.m.yahoo.com
			scaleImagesToScreenWidth(); 
				if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Banner image goes over screen width on new.m.yahoo.com). See browser.js for details');
		}
		if(href=="http://www.tw.yahoo.com/"){			// UMAFINAL-534, Autocomplete makes typing very slow on www.tw.yahoo.com
			opera.addEventListener('BeforeEventListener.keyup', function(e) {
			    if(e.event.target.name=='q') e.preventDefault();
			}, false);
			opera.addEventListener('BeforeEventListener.keydown', function(e) {
			    if(e.event.target.name=='q') {e.preventDefault();}
			}, false);
				if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Autocomplete makes typing very slow on www.tw.yahoo.com). See browser.js for details');
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Yahoo!). See browser.js for details');
	} else if(hostname.indexOf('addynamix.com') > -1){			// SEOUL-601, Fixes panning on addynamix.com
		addCssToDocument('#main {overflow: visible;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Fixes panning on addynamix.com). See browser.js for details');
	} else if(hostname.indexOf('anycall.com')!=-1){			// SEOUL-615, Hide popup ad that can't be closed and blocks most content on the site
		addCssToDocument('#hapticMain {display: none !important;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Hide popup ad that can\'t be closed and blocks most content on the site). See browser.js for details');
	} else if(hostname.indexOf('att.com')!=-1){			// PIONER-195, Browser sniffing causes failed Flash detection
		if(opera.flashPluginAX && opera.flashPluginAX()){
			opera.addEventListener('BeforeExternalScript', function(e){
				if(e.element.src.indexOf('flash.js')>-1){
					var oldua=navigator.userAgent;
					navigator.userAgent = navigator.userAgent.replace( /Opera/, 'MSIE' );
					opera.addEventListener('AfterExternalScript',function(){
						navigator.userAgent=oldua;
					}, false);
				}
			},false);
		}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Browser sniffing causes failed Flash detection). See browser.js for details');
	} else if(hostname.indexOf('blogger.com')>-1){			// OSAN2-38, Blogger: browser detection prevents WYSIWYG editing
		navigator.product = 'Gecko';
		navigator.userAgent = navigator.userAgent.replace(/Opera/, 'Firefox')+' ( rv:1.9.0.3)';
		
		opera.defineMagicVariable(
			'Detect',
			function( obj ){return obj;},
			function( obj ){
				obj.OPERA = function(){return false;}
				obj.MOZILLA = function(){return true;}
				obj.IE=function(){return false;}
				obj.IE_5_5_newer=function(){return false;}
				return obj;
			}
		);
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Blogger: browser detection prevents WYSIWYG editing). 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('capitalone.com')>-1&&location.protocol=='https:'){			// OSAN-263, CapitalOne login fails - cross-domain access on https disallows setting location
		document.domain='capitalone.com';
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (CapitalOne login fails - cross-domain access on https disallows setting location). See browser.js for details');
	} else if(hostname.indexOf('chinatimes.com')>-1){			//  UMAFINAL-1483, Prevent unexpected back navigation on chinatimes.com
		window.history.go=function(){};
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Prevent unexpected back navigation on chinatimes.com). See browser.js for details');
	} else if(hostname.indexOf('chosun.com')>-1){			// 279130, Morningplus.chosun.com misplaced content
		addCssToDocument('#scroll_image{ position: relative }');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Morningplus.chosun.com misplaced content). See browser.js for details');
	} else if(hostname.indexOf('clearwire.com')!=-1){			// PIONER-268, PIONER-268 Flash on clearwire.com doesn't display on homepage
		opera.defineMagicVariable('flash', function(o){ o.embedMovie = function(swfFile,width,height,bgcolor,ver,altFormat,params) { s = '<embed src="'+swfFile+'" quality="high" type="application/x-shockwave-flash" swLiveConnect=true pluginspage="https://www.macromedia.com/go/getflashplayer" width=' + width + ' height=' + height + ' bgcolor="'+bgcolor+'"></embed>\n'; document.write(s); }; o.hasVersion=function(){return true;}; o.swf=true; return o;}, null);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (PIONER-268 Flash on clearwire.com doesn\'t display on homepage). See browser.js for details');
	} else if(hostname.indexOf('dcinside.com') > -1){			// SEOUL-22, Fixes having scrollbars appear when panning on dcinside.com
		addCssToDocument('body {overflow: visible} .favoriteDiv {overflow: visible} .dcMainAll {overflow: visible}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Fixes having scrollbars appear when panning on dcinside.com). See browser.js for details');
	} else if(hostname.indexOf('diodeo.com')>-1){			// 354368, Offsets a very noticeable image in the header of diodeo.com
		addCssToDocument('#top_banner{position:absolute!important;left:698px;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Offsets a very noticeable image in the header of diodeo.com). See browser.js for details');
	} else if(hostname.indexOf('iple.com')>-1){			// 354059, Blocks floating flash ad on iple.com
		opera.addEventListener('BeforeExternalScript', function (e) {
		getAttribute.call=preventDefault.call=call;
		if(getAttribute.call(e.element, 'src') == 'http://adkt.iple.com:8080/js.kti/iplePub/intro@floating') {preventDefault.call(e);}}, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Blocks floating flash ad on iple.com). 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('kr.msn.com')!=-1){			// 349584, head layout broken on kr.msn.com
		addCssToDocument('li:after, ul:after{display:none!important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (head layout broken on kr.msn.com). See browser.js for details');
	} else if(hostname.indexOf('m.reference.com')!=-1){			// TWEETY-107, Mobile reference.com uses generic doctype
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile reference.com uses generic doctype). See browser.js for details');
	} else if(hostname.indexOf('m.zdnet.com')!=-1){			// TWEETY-109, Mobile zdnet.com should be displayed in mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile zdnet.com should be displayed in mobile view). See browser.js for details');
	} else if(hostname.indexOf('mail.google.com')!=-1){			// SOKRI4-171, GMail detects mobile version as desktop version if opera.version() says 9.5
		window.opera.version = opera.version = function() { return 0; }
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (GMail detects mobile version as desktop version if opera.version() says 9.5). See browser.js for details');
	} else if(hostname.indexOf('mail.live.com')!=-1){			// CORE-17444, define document.selection.empty in Hotmail (part of drag-and-drop fix)
		if(document.selection)document.selection.empty = function() {
			var sel = getSelection();
			if (!sel.isCollapsed) {
				sel.removeAllRanges();
			}
		};
				// CORE-17447, Mispositioned sprites due to missing CSS
		addCssToDocument('.c_is { display: inline-block }');
				// CORE-17445, Detecting style.filter causes missing opacity effects
		CSSStyleDeclaration.prototype.__defineGetter__('filter', function() {
			return undefined;
		});
				// CORE-17446, Borders on folders remain after dragging things past them
		var styleDec = (document.documentElement) ? document.documentElement.style : null;
		if(styleDec){
			var getBorderColor = styleDec.__lookupGetter__('borderColor');
			var setBorderColor = styleDec.__lookupSetter__('borderColor');
			CSSStyleDeclaration.prototype.__defineGetter__('borderColor', function() {
				if (parseFloat(this.borderWidth, 10)) {
					return getBorderColor.apply(this, arguments);
				}
				return '';
			});
			CSSStyleDeclaration.prototype.__defineSetter__('borderColor', setBorderColor);
		}
				// CORE-17451, Defining a setter causes difference between point and bracket notation for ES properties, breaks panel resize
		var ds = CSSStyleDeclaration.prototype.__defineSetter__;
		CSSStyleDeclaration.prototype.__defineSetter__ = function(prop, fn) {
			if (!this.__lookupGetter__(prop)) {
				var getter = document.documentElement.style.__lookupGetter__(prop);
				this.__defineGetter__(prop, getter);
			}
			return ds.apply(this, arguments);
		};
				// CORE-17500, Identify as Opera to the client-side sniffer
		if (!/EditMessageLight/.test(location.pathname)) {
			var browser = undefined;
			window.__defineGetter__('Browser', function() {
				return browser;
			});
			window.__defineSetter__('Browser', function(v) {
				browser = v;
				if (browser) {
					delete browser.isFF;
					delete browser.isFF2;
					delete browser.isFF3;
				}
				return browser;
			});
		}
		
		// Restore Opera UA string (we mask as Firefox to get the correct code over HTTP)
		var stuff = navigator.userAgent.split('(')[1].split(')')[0].split(';');
		stuff.pop();
		navigator.userAgent = 'Opera/' + opera.version() + ' (' +
				stuff.join(';') + ') Presto/' +
				(parseFloat(opera.version()) < 10 ? '2.1' : '2.2');
				// UMAFINAL-1189, Fake designMode for Hotmail, hides rich text UI
		prepareFakeDesignMode();
		addCssToDocument('.ButtonList{display:none!important}');
				// DSK-235885, Hotmail uses lookupGetter on prototypes, not instances
		var styleSetterLookupMethod = document.createElement('span').style.__lookupSetter__;
		 CSSStyleDeclaration.prototype.__lookupSetter__ = function(prop){
			return styleSetterLookupMethod.call(document.createElement('span').style, prop);
		 };
				// CORE-15945, It's usually not necessary to define properties that are already supported with getters and setters.
		var realHTMLElementDefineGetter = HTMLElement.prototype.__defineGetter__;
		HTMLElement.prototype.__defineGetter__ = function(name, func){
			if( name in {'document':''} ) return;
			realHTMLElementDefineGetter.call(this, name, func);
		}
		
				// CORE-15973, Resize function causes event loop due to mutation listener
		opera.defineMagicFunction('dap_Resize', function(){});
				// DSK-239582, redefine document.selection with live.com's compat-layer version
		document.addEventListener( 'load', function(e){
			if(e.target instanceof HTMLIFrameElement  && e.target.id=='RichTextEditor_surface'){
				try{
					var doc=e.target.contentDocument;
					var win=doc.defaultView;
					var fakeHotmailSelectionObject;
					win.HTMLDocument.prototype.__defineSetter__('selection', function(obj){
						fakeHotmailSelectionObject=obj;
					});
					doc.__defineGetter__('selection', function(){
						return fakeHotmailSelectionObject;
					});
		
				setTimeout( function(){
					doc.addEventListener( 'mouseup', fakeOnselectionchange, false );
					doc.addEventListener( 'DOMCharacterDataModified', fakeOnselectionchange, false );
					doc.addEventListener( 'keydown', fakeOnselectionchange, false );
					doc.addEventListener( 'keyup', fakeOnselectionchange, false );}, 500);
				}catch(e){}
			}
			function fakeOnselectionchange(){
				var b=doc.createEvent("Event");
				b.initEvent('selectionchange',true,false);
				doc.dispatchEvent(b);
			}
		},true); 
				// DSK-235885, Adding editor area styling that is missing due to browser sniffing
		addCssToDocument('.RTE .Container iframe{width: 100% !important; height: 100% !important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (define document.selection.empty in Hotmail (part of drag-and-drop fix)\nMispositioned sprites due to...). See browser.js for details');
	} else if(hostname.indexOf('mk.co.kr') > -1){			// 364762, mk.co.kr requests a lot of additional javascript after checking document.all - customer requested fix for load time
		document.all = undefined;
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (mk.co.kr requests a lot of additional javascript after checking document.all - customer requested fi...). See browser.js for details');
	} else if(hostname.indexOf('mobile.answers.com')!=-1){			// TWEETY-108, Mobile answers.com displayed as desktop site
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile answers.com displayed as desktop site). See browser.js for details');
	} else if(hostname.indexOf('mobile.handango.com')!=-1){			// TWEETY-44, mobile.handango.com pages are displayed in overview mode, since they are declared without doctype.
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (mobile.handango.com pages are displayed in overview mode, since they are declared without doctype.). See browser.js for details');
	} else if(hostname.indexOf('mobile.microsoft.com')!=-1){			// TWEETY-114, Mobile microsoft.com should be displayed as a mobile page
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile microsoft.com should be displayed as a mobile page). See browser.js for details');
	} else if(hostname.indexOf('mobile.orange.ch')!=-1){			// 357472, Fix for table align making tables behave as inline on mobile.orange.ch
		addCssToDocument('table{float:none; !important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Fix for table align making tables behave as inline on mobile.orange.ch). See browser.js for details');
	} else if(hostname.indexOf('mobile.youporn.com')!=-1){			// TWEETY-109, Mobile youporn.com uses generic doctype
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile youporn.com uses generic doctype). See browser.js for details');
	} else if(hostname.indexOf('moneta.co.kr')!=-1){			// SEOUL-618, Renames method on moneta.co.kr (was named goto), also hides flash advertisements that cover content
		window.opera.addEventListener('BeforeScript', function(e) {
		e.element.text = e.element.text.replace(
				  /function goto\(/g,
				  'function moneta_co_kr_goto('
				);
		}, false);
		
		window.opera.addEventListener(
			    'BeforeJavascriptURL',
			    function (e) {
			      if( e.source.indexOf('goto') != -1 ) {
				
				e.source = e.source.replace(
				  /goto\(/g,
				  'moneta_co_kr_goto('
				);
			      }
			    },
			    false
			  );
		
				// 219041,  moneta.co.kr relies on IE quirks for CSS positioning
		addCssToDocument('#stocking{position:relative}#stocking>div{position:absolute}');
				// SEOUL-466, Gets rid of flash that is mispositioned on moneta.co.kr
		opera.addEventListener('BeforeExternalScript', function(e){
		preventDefault.call=indexOf.call=call; if(e.element.src && indexOf.call(e.element.src, 'ad.moneta.co.kr')!=-1){preventDefault.call(e);}}, false);
				// OTW-4374, Hides background image in search bar on moneta.co.kr
		opera.defineMagicFunction('searchCheck', function() { document.getElementsByName('kwd')[0].style.background = 'none';});
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Renames method on moneta.co.kr (was named goto), also hides flash advertisements that cover content\...). 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('netian.com')>-1){			// 354018, Moves the absolutely positioned SMS div on netian.com (after logging in)
		addCssToDocument('#closer { position: relative !important }');
		addCssToDocument('#hd { position: relative !important }');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Moves the absolutely positioned SMS div on netian.com (after logging in)). See browser.js for details');
	} else if(hostname.indexOf('netpia.linkprice.com')>-1){			// 354340, Clears popups that are visible after loading subpages on netpia.linkprice.com
		addEventListener.call(document, 'load', function(){try{clear()}catch(e){}}, false);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Clears popups that are visible after loading subpages on netpia.linkprice.com). See browser.js for details');
	} else if(hostname.indexOf('news.msn.co.kr') >-1){			// 342895, news.msn.co.kr navigation bar is offset from the page
		addCssToDocument('#home{position:relative!important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (news.msn.co.kr navigation bar is offset from the page). 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('ota.getvzappzone.com')!=-1){			// TWEETY-192, Verizon Wireless mobile app zone site should default to mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Verizon Wireless mobile app zone site should default to mobile view). See browser.js for details');
	} else if(hostname.indexOf('pda.naver.com')!=-1){			// 252168, pda.naver.com appears half-offscreen
		window.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('phim88.com')>-1){			// SOKRI4-1002, "Close overlay ad before playing film" does not work with a window-level plugin implementation
		// phim88.com code uses LTAS object
		opera.defineMagicVariable('LTAS', function(obj){
			var origOverlayCloseandPlay=obj.OverlayCloseandPlay;
			obj.OverlayCloseandPlay=function(playerid){
				document.getElementById(playerid).style.visibility='visible';
				return origOverlayCloseandPlay.apply(this, arguments);
			}
			var origShowAd=obj.ShowAd;
			obj.ShowAd=function(playerid, ad){
				document.getElementById(playerid).style.visibility='hidden';
				return origShowAd.apply(this, arguments);
			};
			return obj;
		}, null);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' ("Close overlay ad before playing film" does not work with a window-level plugin implementation). See browser.js for details');
	} else if(hostname.indexOf('rr.com') != -1){			// PIONER-353, Text-shadow not properly specified on rr.com
		addCssToDocument("a.btnXLRed span, .header .content .menu li a{text-shadow:none !important;}");
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Text-shadow not properly specified on rr.com). See browser.js for details');
	} else if(hostname.indexOf('samsungmobileusa.com')>-1){			// PIONER-271, Samsung USA flash detection fix
		addPreprocessHandler(/9\.0\.115\.0/, '9.1.125.0' );
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Samsung USA flash detection fix). See browser.js for details');
	} else if(hostname.indexOf('sayclub.com')>-1){			// 363232, hides id and password background images that are text input backgrounds
		document.addEventListener('DOMFocusIn', function(e){if(e.target.tagName=='INPUT'){
			e.target.style.backgroundImage = 'none';
			e.target.addEventListener('keypress', function(){ this.style.backgroundImage='none'; },false);
		}},true);
		
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (hides id and password background images that are text input backgrounds). See browser.js for details');
	} else if(hostname.indexOf('show.co.kr')!=-1){			// 348818, Pre-filled text as INPUT background not cleared on focus
		document.addEventListener('focus', function(e){if(e.target.tagName=='INPUT'){e.target.style.backgroundImage='none'; e.target.onfocus=null;}},true);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Pre-filled text as INPUT background not cleared on focus). See browser.js for details');
	} else if(hostname.indexOf('siren24.com')!=-1){			// SEOUL-609, ActiveX installation page redirect on siren24.com due to sniffing limitation on redirect script
		navigator.appName = 'Netscape';
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (ActiveX installation page redirect on siren24.com due to sniffing limitation on redirect script). 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('sports.donga.com')>-1){			// 354059, Blocks floating flash ad on sports.donga.com that cannot be closed
		addCssToDocument('#FloatLayer1{visibility:hidden!important}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Blocks floating flash ad on sports.donga.com that cannot be closed). See browser.js for details');
	} else if(hostname.indexOf('star.moneytoday.co.kr')>-1){			// 348222, Clicks on a link to display the front page story in an iframe on star.moneytoday.co.kr
		try {
		    addEventListener.call(document, 'DOMContentLoaded', function(){
		        var elm=document.getElementById('realtimenews');
		        if(elm){
		            elm.childNodes[1].childNodes[1].childNodes[0].click();
		        }
		    }, false);
		} catch(e) {}
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Clicks on a link to display the front page story in an iframe on star.moneytoday.co.kr). See browser.js for details');
	} else if(hostname.indexOf('stylenanda.co.kr')>-1){			// CUBIC-211, Clicks blocked on stylenanda.co.kr
		opera.defineMagicFunction('click', function (oFun, oThis){ return true; } );
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Clicks blocked on stylenanda.co.kr). 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('tistory.com')!=-1){			// 347990, two login buttons on tistory.com
		addCssToDocument('#memberbox .btn-login {text-indent:-100px;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (two login buttons on tistory.com). 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('veoh.com')>-1){			// HMONY-281, Prevent Omniture-overwritten documents on veoh.com
		avoidDocumentWriteAbuse();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Prevent Omniture-overwritten documents on veoh.com). See browser.js for details');
	} else if(hostname.indexOf('viacom.com')!=-1){			// SEOUL-616, Tweaked SWFObject on viacom.com creates constant document reflows
		opera.defineMagicVariable('plugin', function(curVal) { return true; }, null);
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Tweaked SWFObject on viacom.com creates constant document reflows). See browser.js for details');
	} else if(hostname.indexOf('wap.flycell.com.br')!=-1){			// SOKRI3-1432, Avoid CSS input validation of hidden inputs
		addCssToDocument('input[type=hidden], input[type=submit]{-wap-input-format: "*m" !important;}');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Avoid CSS input validation of hidden inputs). See browser.js for details');
	} else if(hostname.indexOf('wap.smartone-vodafone.com')>-1){			// SOKRI3-1645, Re-initialize page on back to make plugins work correctly
		opera.setOverrideHistoryNavigationMode('compatible');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Re-initialize page on back to make plugins work correctly). See browser.js for details');
	} else if(hostname.indexOf('wapp.verizon.net')!=-1){			// OSAN-11, Verizon mobile webmail service should default to mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Verizon mobile webmail service should default to mobile view). 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.indexOf('www.google.com')!=-1&&pathname.indexOf('/m')==0&&pathname.indexOf('/mail')==-1){			// UMAFINAL-719, On narrow screens Google's navigation bar can wrap and cause overlap
		addCssToDocument('.navbar { height: auto; !important; }');
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (On narrow screens Google\'s navigation bar can wrap and cause overlap). See browser.js for details');
	} else if(hostname=='live.vodafone.com'&&pathname.indexOf('/jumppage')==0){			// 362160, Display Vodafone's Google search site in Normal Zoom by default
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Display Vodafone\'s Google search site in Normal Zoom by default). See browser.js for details');
	} else if(hostname=='m.espn.go.com'){			// OSAN2-282, Content goes over screen width on m.espn.go.com
		scaleImagesToScreenWidth();
		forceWordWrapping();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Content goes over screen width on m.espn.go.com). See browser.js for details');
	} else if(hostname=='mobile.nytimes.com'){			// OSAN2-284, Logo image goes over screen width on mobile.nytimes.com
		scaleImagesToScreenWidth();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Logo image goes over screen width on mobile.nytimes.com). See browser.js for details');
	} else if(hostname=='mobile.reuters.com'){			//  OSAN2-309, Mobile Reuters uses images that are larger than 240px width
		scaleImagesToScreenWidth();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Mobile Reuters uses images that are larger than 240px width). See browser.js for details');
	} else if(hostname=='mobile.vzwapp.com' || hostname=='mobile.vzw.com' || hostname=='start.vzw.com'){			// OSAN-227, VZW mobile start page has colored span elements that overlap images
		if(location.pathname=='/')addCssToDocument('span{background: none !important;}');
				// 356069, VZW mobile portal does not trigger mobile view
		forceMobileView();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (VZW mobile start page has colored span elements that overlap images\nVZW mobile portal does not trig...). 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=='weather-mobile.weatherbug.com'){			// OSAN2-283, Banner goes over screen width on weather-mobile.weatherbug.com
		scaleImagesToScreenWidth(); 
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Banner goes over screen width on weather-mobile.weatherbug.com). See browser.js for details');
	} else if(hostname=='xhtml.emome.net'){			// 328103, emome.net wap portal does not trigger mobile view
		forceMobileView();
			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');
	} else if(href == 'http://www.dowwallpaper.com/index.htm'){			// UMAFINAL-1521, redirect to frame content to prevent rendering error for small buffer size
		window.location.replace("home.php");
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (redirect to frame content to prevent rendering error for small buffer size). See browser.js for details');
	} else if(href=="http://www.google.com.tw/"){			// UMAFINAL-534, Autocomplete makes typing very slow on google.com.tw
		(function(){
		    opera.addEventListener('BeforeEventListener.keyup', function(e) {
		        if(e.event.target.name=='q') e.preventDefault();
		    }, false);
		    opera.addEventListener('BeforeEventListener.keydown', function(e) {
		        if(e.event.target.name=='q') {e.preventDefault();}
		    }, false);
		    var setInt=window.setInterval;
		    setInterval=function(func,time){
			if( time==10 )time=2000;
			setInt.call(this, func,time);
		    };
		    })();
			if(self==top)postError.call(opera, 'Opera has modified the JavaScript on '+hostname+' (Autocomplete makes typing very slow on google.com.tw). See browser.js for details');
	}

})(opera);
