// JavaScript Document
//
//Cadex inc
//
//
//Author : Richard Surprenant
//Date   : 08-10-2009
//
//Purpuse: This file is intende to call PHP function to return DB values to HTML pages.
//
//
<!--
// PRELOADING IMAGES
if (document.images) {
 btn1_down=new Image(); btn1_down.src="images2/DownloadE3.jpg"; 
 btn1_over  =new Image(); btn1_over.src  ="images2/DownloadE2.jpg"; 
 btn1_up  =new Image(); btn1_up.src  ="images2/DownloadE.jpg"; 

 btn2_down=new Image(); btn2_down.src="images2/DownloadC3.jpg"; 
 btn2_over  =new Image(); btn2_over.src  ="images2/DownloadC2.jpg"; 
 btn2_up  =new Image(); btn2_up.src  ="images2/DownloadC.jpg"; 
}

// EVENT HANDLERS
function pressButton(btName) {
 if (document.images)
  eval('document.'+btName+'.src='+btName+'_down.src');
}

function overButton(btName) {
 if (document.images)
 eval('document.'+btName+'.src='+btName+'_over.src');
}

function releaseButton(btName) {
 if (document.images)
  eval('document.'+btName+'.src='+btName+'_up.src');
}

function GetPDFPath(strLanguage)
{
	var	lang;
//	return Redirect('http://localhost/readfile.php?file=<?=$filename?>');"><?=$filename?>
	//This function will retreve the Cadex PDF path on FTP server from the  Table
	//by passing the language.
	
	switch(strLanguage) {
		case 'E':  lang ='The language is english'
			break;

		case 'C': lang = 'The language is chinese'
		  break;
	}		
	alert(lang);
}

function GetPDFPageFileName(strProductNumber, strLang)
{
	//This function will retreve the Cadex PDF page name from the PDF Catalog Table
	//by passing the product number.
	window.location.href = "Catalog.php?searchpage=" + strProductNumber + "&searchpath=" + strLang; 
	//+ "&searchpath" + strLang;
	//GetPDFPath(strLang)
}

