function activatePlaceholders(phclass,normalclass) {
		var detect = navigator.userAgent.toLowerCase(); 
		if (detect.indexOf("safari") > 0) return false;
		var inputs = document.getElementsByTagName("input");
		for (var i=0;i<inputs.length;i++) {
			var inputType = inputs[i].getAttribute("type");
			if ((inputType == "text")||(inputType == "search")) {
				var placeholder = inputs[i].getAttribute("placeholder");
				if (placeholder.length > 0) {
					inputs[i].value = placeholder;
					inputs[i].onclick = function() {
						if (this.value == this.getAttribute("placeholder")) {
							this.value = "";
							this.className = normalclass;
						}
						return false;
					}
					inputs[i].onblur = function() {
						if (this.value.length < 1) {
							this.value = this.getAttribute("placeholder");
							this.className = phclass;
						}
					}
				}
			}
		}
	}


//******* CHUNK FOR PROMPT *****
//based on http://www.anyexample.com/webdev/javascript/ie7_javascript_prompt()_alternative.xml 

var prompt_callback = null;
var prompt_callback_options = '';
 
function ae_prompt(cb, q, a, o) {
	prompt_callback = cb;
	prompt_callback_options = o;
	//document.getElementById('aep_t').innerHTML = document.domain + ' question:';
	document.getElementById('aep_prompt').innerHTML = q;
	document.getElementById('aep_text').value = a;
	document.getElementById('aep_ovrl').style.display = document.getElementById('aep_ww').style.display = '';
	document.getElementById('aep_text').focus();
	document.getElementById('aep_text').select();
}
 
// This function is called when user presses OK(m=0) or Cancel(m=1) button
// in the dialog. You should not call this function directly.
function ae_clk(m) {
	// hide dialog layers 
	document.getElementById ('aep_ovrl').style.display = document.getElementById('aep_ww').style.display = 'none';
	if (!m)  
		prompt_callback(null, prompt_callback_options);  // user pressed cancel, call callback with null
	else
		prompt_callback(document.getElementById('aep_text').value, prompt_callback_options); // user pressed OK 
}


//**** Chunk for iPhone ****

function clickLink()  
{
    var e = window.event.target;
    var isLink = (e.tagName == "A") ;
	if (isLink == false) {
		if(e.parentNode.tagName == "A") {
			e = e.parentNode;
			isLink = true;
		}
	}

    if (isLink) {
	if (e.className.match("noeffect")||e.target.match("_blank")) {}
		else {
	        window.location.href = e.href;
		window.event.returnValue = false; 
	}
    }
}

function addLoadEvent(func) { 
    var oldonload = window.onload; 
        if (typeof window.onload != 'function') { 
            window.onload = func; 
        } else { 
            window.onload = function() { 
                if (oldonload) { 
                    oldonload(); 
                } 
            func(); 
        } 
    } 
} 


function fullscreen() {
    var a = document.getElementsByTagName("a");
    for (var i = 0; i < a.length;i++) {
        if (a[i].className.match("noeffect")||a[i].target.match("_blank")) {
       }
    else {
   /***TEST a[i].className = a[i].className+" test"; ****/		
            a[i].onclick = function () {
                window.location = this.getAttribute("href");
                return false;
            };
        }
    }
}

function hideURLbar() {
    window.scrollTo(0, 0.9);
}

function printThisIframe() {
	alert("?");
	print();
	return false;
}

//addLoadEvent(fullscreen);    //perhaps should restrict to iphone/ipad?
//addLoadEvent(hideURLbar);    //perhaps should restrict to iphone/ipad?

