//JavaScript Document
//Author: Daniel Perry
//Email: daniel@gogetthin.com, daniel.perry42@gmail.com
//Last Edit: 01.29.2010
//This file is only intended for use on GoGetThin.com by Core Health Innovations

//creates the images to be preloaded
promo1=new Image();
promo2=new Image();
//this preloads the images for the gogetthin index page
function loadImages() {
	promo1.src='images/promo-button-1.png';
	promo2.src='images/promo-button-2.png';
}
//this is an updated version of the popup function designed to work with Slimbox
function popup(id) {
	adjust=0;
	if(getBrowserInfo().browser=='Explorer') adjust=10;
	switch(id) {
		case 'micro':
			Mediabox.open('popups/microencapsulation.php','','external 450 375');
			break;
		case 'clinic':
			h=320+adjust;
			w=550+adjust;
			Mediabox.open('popups/clinical-study.php','','external '+w+' '+h);//Mediabox options:('file','','options width height')
			break;
	}
}
//returns the current time as a string
function time() {
	date=new Date();
	h=date.getHours();
	m=date.getMinutes();
	s=date.getSeconds();
	if(m<10) {m='0'+m;}
	if(s<10) {s='0'+s;}
	return 'Current Time: '+h+':'+m+':'+s;
}
//returns the current year
function year() {
	date=new Date();
	return date.getFullYear();
}
//change iframe src
function setSrc(frame, newSrc){
	frame.src=newSrc;
}