/**********************************************************************************
** DATE:		07.02.08
** TEMPLATE:	Homesite
** DESCRIPTION:	All JavaScripts pertaining to the Company Website
** METHODS: 	
** ATTRIBUTE:	
** NOTES:		
***********************************************************************************/

/**********************************************************************************
** Setting up the DOM object
***********************************************************************************/
var isNS = 0;
var isIE = 0;
if(navigator.appName == "Microsoft Internet Explorer")
	isIE = 1;
else if(navigator.appName == "Netscape")
	isNS = 1;

var docObj = (isNS) ? "document." : "document.all.";
var styleObj = (isNS) ? "" : ".style";

/**********************************************************************************
** In the home page, change the text color
***********************************************************************************/
function YellowText(ThisLink){
	var dom = eval(docObj + ThisLink + styleObj);
	dom.color = "FFCC00";
}

function WhiteText(ThisLink){
	var dom = eval(docObj + ThisLink + styleObj);
	dom.color = "FFFFFF";
}

/**********************************************************************************
** Different caculator
***********************************************************************************/
function ShowCalculator(ID){
	var URL = "";
	if(ID == 0)
		URL = "../Tools/RevenueCalculator.cfm";
	else if(ID == 1)
		URL = "../Tools/ROICalculator.cfm";
	else if(ID == 2)
		URL = "../Tools/XLROICalculator.cfm";
	else if(ID == 3)
		URL = "../Tools/RequestCalculator.cfm";
	var WinCal = window.open(URL,"WC",'resizable,scrollbars,top=50,left=50,status');
	WinCal.focus();
}


/****************************************************************************
** Support Window
****************************************************************************/
function SupportDesk(Socket,ID,Page){
	if(Page != "")
		var intPage = "Page=" + Page + "&";
	else
		var intPage = "";
	var intURL = Socket+"/support/Interface.cfm?" + intPage + "C="+ID; 
	var Support = window.open(intURL,"SW","scrollbars,resizable,top=50,left=50,status");
	Support.focus();
}

/****************************************************************************
** Support Window
****************************************************************************/
function SupportFAQ(Socket,ID,FaqID){
	var intURL = Socket+"/support/Interface.cfm?Page=FAQ&FaqID=" + FaqID + "&C="+ID; 
	var Support = window.open(intURL,"SW","scrollbars,resizable,top=50,left=50,status");
	Support.focus();
}

/****************************************************************************
** Partners Window
****************************************************************************/
function Partners(intURL){
	var Partners = window.open(intURL,"PWin","scrollbars,resizable,status,location,toolbar,width=800,height=600");
	Partners.focus();
}


/**********************************************************************************
** Open new window with Image only
***********************************************************************************/
function ImageWin(pic, w, h){
	var intURL = "/images/" + pic;
	var iwin = window.open(intURL,"iw","top=0,left=0,status,resizable,width="+w+",height="+h);
	iwin.focus();
}
