function checkIt(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        status = "This field accepts numbers only."
        return false
    }
    status = ""
    return true
}


var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var $ = function(id) {
      return document.getElementById(id);
}

var print_page = function() {
    window.print();
}

// text size - BEGIN //

//variables
var textStatus = "small";

var smallTextSize = 1;
var largeTextSize = 1.2;
var containerDiv = "content_page_holder"
var containerDivWide = "content_page_wide"

var text_size = function() {
    textStatus = (textStatus == "small") ? "big" : "small";

    document.cookie = "textSizeCookie=" + textStatus + "; 0; path=/";
    set_text_size(textStatus);
}

var set_text_size = function( textStatus )
{
	var text_container = false;
	if (document.getElementById(containerDiv) != null) {
	    text_container = document.getElementById(containerDiv);
	} else if (document.getElementById(containerDivWide) != null) {
	    text_container = document.getElementById(containerDivWide);
	}
	if (text_container) {
	    if (textStatus == "big") {
	        text_container.style.fontSize = largeTextSize + "em";
	        text_container.style.lineHeight = largeTextSize + "em";
	    }
	    else if (textStatus == "small") {
	        text_container.style.fontSize = smallTextSize + "em";
	        text_container.style.lineHeight = largeTextSize + "em";
	    }
	}
}

var text_size_persist = function()
{
	c_start = (document.cookie.indexOf("textSizeCookie=")) + 15;
	size = document.cookie.substring(c_start);
	//alert(size);
	if(size == "big")
	{
	    set_text_size("big");
	}
	if (size == "big" || size == "small")
	{
	    textStatus = size;
	}
	
}

function linkExternal(url) {
	
	//urchinTracker('/external/' + url.href);
	if(url.href.toLowerCase().indexOf("santhera.com")== -1)
	{ 
		return(confirm("You are now leaving CatenaInfo.ca and moving to an external Web site independently operated "+ 
		"and not managed by Santhera Pharmaceuticals, Inc. Santhera Pharmaceuticals, Inc. assumes no "+ 
		"responsibility for the content on the site. \n\n"+
		 
		"Click Cancel to return or OK to continue."));
	} 
	else
	{
		return true;
	}
}

function linkExternalfr(url) {
	
	//urchinTracker('/external/' + url.href);
	if(url.href.toLowerCase().indexOf("santhera.com")== -1)
	{ 
		return(confirm("Vous quittez a present CatenaInfo.ca pour acceder a un site Web independant qui n'est pas gere par Santhera Pharmaceuticals, Inc. Santhera Pharmaceuticals, Inc. se degage de toute responsabilite pour le contenu de ce site."));
	} 
	else
	{
		return true;
	}
}


text_size_persist();

// requires Yahoo event library
YAHOO.util.Event.onDOMReady(text_size_persist); 
// text size - END //

