var agent = navigator.userAgent.toString().toLowerCase();
var isIE = false;

if (agent.indexOf(' msie ') > -1){
	isIE = true;
}

if (isIE){
    // 1) Fix INPUT and TEXTAREA background images
    
    // Pin IE background-images to stop scrolling with type.
    // This is handled differently than other (w3c standard) browsers
    
	var inputs = document.getElementsByTagName('input');

	for(var i=0 ; i<inputs.length ; i++){
		inputs[i].style.backgroundAttachment = 'fixed';
	}

	var textareas = document.getElementsByTagName('textarea');

	for(var i=0 ; i<textareas.length ; i++){
		textareas[i].style.backgroundAttachment = 'fixed';
	}
	
    // 2) Fix OBJECT and EMBED tags to disable the "Click to activate and use this control" pane
    // Affects flash movies, video/audio players, etc
	
    // IE6 on Windows SP2 and newer only
    // Get the HTML content of each object and embed tag and replace it with itself.
	
    if (agent.indexOf('mac') < 0) {
	
        if (document.getElementsByTagName) {
	    
	        var objs = document.getElementsByTagName('embed');

	        for (i=0; i<objs.length; i++) {
		        objs[i].outerHTML = objs[i].outerHTML;
	        }
        }
    }
}
