function clearEmail(theform) {
		if (theform.email.value == "Enter Your Email") {
			theform.email.value = "";
		}
}

function OpenWin(URL,w,h) {
  newWindow=window.open(URL,"","height="+h+",width="+w+",resizable=1,scrollbars=0,status=0");
  }

function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}
function centrePopup() {
    var myWidth = 0, myHeight = 0;
    var el = document.getElementById("popup_splash");
    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = 613;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    el.style.top = parseInt(myHeight / 2 - 108) + "px";
    el.style.left = parseInt(myWidth / 2 - 216) + "px";   
}

function showPopup() {
    var el = document.getElementById("popup_splash");
    el.style.visibility = "visible";
}

function hidePopup() {
    var el = document.getElementById("popup_splash");
    el.style.visibility = "hidden";
}

var preloadFlag = false;
function preloadImages() {
    if (document.images) {
        menu_news_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_news_over.jpg");
        menu_bio_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_bio_over.jpg");
        menu_music_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_music_over.jpg");
        menu_shows_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_shows_over.jpg");
        menu_gallery_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_gallery_over.jpg");
        menu_forum_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_forum_over.jpg");
        menu_contact_over = newImage("http://www.lindiortega.ca/news/wp-content/themes/lindinews4/images/menu_contact_over.jpg");
        preloadFlag = true;
    }
}

function autoLoad() {
    preloadImages();
    centrePopup();
    showPopup();    
}

if (parent.frames.length > 0) {
    parent.location.href = self.document.location
}

