if(!window.JSFX)
	JSFX=new Object();

JSFX.RolloverObjects=new Array();

JSFX.Rollover = function(name, img)
{
	JSFX.RolloverObjects[name]= new Image();
	JSFX.RolloverObjects[name].img_src = img;	
	if(!JSFX.Rollover.postLoad)
		JSFX.RolloverObjects[name].src = img;
}
JSFX.Rollover.postLoad = false;
JSFX.Rollover.loadImages = function()
{
	var i;
	for(i in JSFX.RolloverObjects)
	{
		r=JSFX.RolloverObjects[i];
		r.src=r.img_src;
	}
}
JSFX.Rollover.error = function(n)
{
		alert("JSFX.Rollover - An Error has been detected\n"
			+ "----------------------------------\n"
			+ "You must define a JSFX.Rollover in your document\n"
			+ "JSFX.Rollover(\""+n+"\",\"your_on_img.gif\")\n"
			+ "(check the spelling of your JSFX.Rollovers)");
}
JSFX.findImg = function(n) 
{
	var img = JSFX.getImg(n, document);

	/*** Stop emails because the image was named incorrectly ***/
	if(!img)
	{
		alert("JSFX.Rollover - An Error has been detected\n"
			+ "----------------------------------\n"
			+ "You must define an image in your document\n"
			+ "<IMG SRC=\"your_image.ext\" NAME=\""+n+"\">\n"
			+ "(check the NAME= attribute of your images)");

		return(new Image());
	}
	return img;
}
JSFX.getImg = function(n, d) 
{
	var img = d.images[n];

	if(!img && d.layers)  
		for(var i=0 ; !img && i<d.layers.length ; i++) 
			img=JSFX.getImg(n,d.layers[i].document);

	return img;
}
JSFX.imgOn = function(imgName, rollName)
{
	if(rollName == null)
		rollName=imgName;

	if(!JSFX.RolloverObjects[rollName])
	{
		JSFX.Rollover.error(rollName);
		return;
	}
	var img = JSFX.findImg(imgName);
	if(img.offSrc==null)
		img.offSrc=img.src;
	img.src=JSFX.RolloverObjects[rollName].img_src;
}
JSFX.imgOff = function(imgName)
{
	var img = JSFX.findImg(imgName);
	img.src=img.offSrc;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
	    faqOn = new Image();            faqOn.src ='/images/links/faq_over.gif',
		articlesOn = new Image();       articlesOn.src ='/images/links/articles_over.gif',
		testimonialsOn = new Image();   testimonialsOn.src ='/images/links/testimonials_over.gif',
		drapprovedOn = new Image();     drapprovedOn.src ='/images/links/drapproved_over.gif',
		compareOn = new Image();        compareOn.src ='/images/links/compare_over.gif',
		orderOn = new Image();          orderOn.src ='/images/links/order_over.gif',
        homeOn = new Image();           homeOn.src ='/images/links/home_over.gif',
		researchOn = new Image();       researchOn.src ='/images/links/research_over.gif',
		aboutOn = new Image();          aboutOn.src ='/images/links/about_normal_over.gif',
		tabpurchaseOn = new Image();    tabpurchaseOn.src ='/images/links/tab_purchase_over.gif',
		tabchatOn = new Image();        tabchatOn.src ='/images/links/tab_chat_over.gif',
		tabcontactOn = new Image();     tabcontactOn.src ='/images/links/tab_contact_over.gif',
		tabbookmarkOn = new Image();    tabbookmarkOn.src ='/images/links/tab_bookmark_over.gif',
		toggleOn = new Image();         toggleOn.src ='/images/links/testimonials/toggle_up.gif',
		but2On = new Image();           but2On.src ='/images/links/testimonials/2on.gif',
		but3On = new Image();           but3On.src ='/images/links/testimonials/3on.gif',
		but4On = new Image();           but4On.src ='/images/links/testimonials/4on.gif',
		but5On = new Image();           but5On.src ='/images/links/testimonials/5on.gif',
		but6On = new Image();           but6On.src ='/images/links/testimonials/6on.gif',
		preloadFlag = true;
	}
}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=350,left=0,top=0');");
}
function popUpMOVIE(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,personalbar=0,scrollbars=0,directories=0,locationbar=0,statusbar=0,menubar=0,resizable=0,width=650,height=400,left=0,top=0');");
}
function popUpMOVIEMAINSTREAM(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,personalbar=0,scrollbars=0,directories=0,locationbar=0,statusbar=0,menubar=0,resizable=0,width=640,height=375,left=0,top=0');");
}