// Base javascript file for www.theraflu.com

// Open new windows functions
function newWindow(href) {
	var newWindow = window.open(href, "newWindow", "width=600, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
	if(!newWindow) return false;
	return true;
}

function newFullWindow(href) {
	var newWindow = window.open(href, "newFullWindow");
	if(!newWindow) return false;
	return true;
}

function newCouponWindow(href) {
	var newWindow = window.open(href, "newWindow", "width=620, height=465, location=yes, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");
	if(!newWindow) return false;
	return true;
}

function newTreatmentWindow(href) {
	var newWindow = window.open(href, "newTreatmentWindow", "width=740, height=800, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes");
	if(!newWindow) return false;
	return true;
}

// Used just for the find your treatment link from flash.
function newTreatmentWindowFromFlash(href) {
	newWindow = window.open(href, "newTreatmentWindow", "width=740, height=800, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes");
}

/*
// First used to rotate an image on the home page before it was updated to flash

var imageNumber = Math.round((Math.random()*1)+1);

function showImage(){
	document.write('<img src="assets/images/homeMainImage_0'+imageNumber+'.jpg" alt="Good To Be Back" title="Good To Be Back" />');
}
*/

// Hide/Show layers on the main Products landing page.
function showLayer(layerName)
{
	if (document.getElementById)
	{
		var targetElement = document.getElementById(layerName);
		targetElement.style.visibility = 'visible';
	}
}

function hideLayer(layerName)
{
	if (document.getElementById) 
	{
		var targetElement = document.getElementById(layerName);
		targetElement.style.visibility = 'hidden';
	}
}

function updateContent(psName)
{
    $('#content_swine_flu').load('includes/'+psName+'.txt');
}
