var ajax = new sack();
var ServiceListObj;
var activeService = false;
var clickedService = false;
var contentObj	// Reference to Service content <div>

function loadQView(pId)
{	
	ajax.requestFile = 'productQuickView.php?PID='+pId;	// Specifying which file to get
	document.getElementById("divQW"+pId).style.display="none";
	document.getElementById("vert-hoz-close").style.display="block";
	ajax.onCompletion = showProductDetail;	// Specify function that will be executed after file has been found
	ajax.onLoading = showWaitMessageP;	// Action when AJAX is loading the file
	ajax.runAJAX();		// Execute AJAX function
}


function showContent()	// Displaying content in the content <div>
{
	document.getElementById('contentObj').innerHTML = ajax.response;	// ajax.response is a variable that contains the content of the external file	
}

function showProductDetail()	// Displaying content in the content <div>
{
	document.getElementById('vert-hoz').innerHTML = ajax.response;	// ajax.response is a variable that contains the content of the external file	
}

function showWaitMessage()
{
	document.getElementById('contentObj').innerHTML = '<img src="image/loading.gif"> <span class="text5">Please Wait...</span>';
}

function showWaitMessageP()
{
	document.getElementById('vert-hoz').style.display="block";
	document.getElementById('vert-hoz').innerHTML = '<img src="image/axloading.gif"> <span class="text5">Please Wait...</span>';
}

function getAjaxFile(fileName)
{
	ajax.requestFile = fileName;	// Specifying which file to get
	ajax.onCompletion = showContent;	// Specify function that will be executed after file has been found
	ajax.onLoading = showWaitMessage;	// Action when AJAX is loading the file
	ajax.runAJAX();		// Execute AJAX function	
}

function sendFeedBack(txt)	// User have clicked on an Service
{
	getAjaxFile('sendfeedback.php?txt='+txt);	
	if(clickedService && clickedService!=this)clickedService.className='ServiceMouseOver';
	this.className='ServiceClick';
	clickedService = this;
}

