var xmlHttp;
var OptionCode;
var strRequestProcessing = "";
var intTOtalNumberOfItem; 
var intxPosition , intYPosition , divIdCode, intNumberOfQuestion, blnHideStatus, intOverValue;
intOverValue  = 0;
strRequestProcessing="<TABLE BORDER='0' WIDTH='60%'><TR><TD ALIGN='CENTER'><IMG SRC='./images/progress-loader.gif'></TD></TR></TABLE>";

// JavaScript Document
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
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];}
}
//-->

function doOpreation(strDestinationURL,optionCodePass)
{ 
	xmlHttp=GetXmlHttpObject();
	OptionCode = optionCodePass;
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	 }
	var url="";
	url=strDestinationURL;
	//if(optionCodePass == 8)
	//	xmlHttp.onreadystatechange=stateChangedCart
	//else
	xmlHttp.onreadystatechange=stateChanged
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function getNonVulnerabilityString(pStirng)
{
	var strReturnString = "";
	strReturnString = pStirng;
	
	strReturnString = strReturnString.replace("'","&#039;");
	//strReturnString = strReturnString.replace("""", "&#034;");
	strReturnString = strReturnString.replace(")","&#041;");
	strReturnString = strReturnString.replace("(","&#040;");
	strReturnString = strReturnString.replace(";","&#059;");
	strReturnString = strReturnString.replace("-","&#150;");
	strReturnString = strReturnString.replace("|","&#124;");
	
	return strReturnString;
}
function stateChangedCart()
{
	if(xmlHttp.readyState==1)
	{
		document.getElementById('divMessage').innerHTML=strRequestProcessing;
	}
	if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete')
	{
		document.getElementById('divMessage').innerHTML='';
		if(xmlHttp.responseText == false)
		{
			alert('Error occurred while adding selected item in shopping tray. Please try aging to add in shopping cart.');
		}
		else
		{
			alert('Selected item has been added successfully in your shopping cart.');
		}
	}
}


/*************************************************************************************************************************************************
Purpose : Creating XMLHTTPRequest Object do perfrom the XMLHTTP communcation.
Input   : None.
Return  : XMLHTTPRequest Object.
*************************************************************************************************************************************************/
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
		{
			xmlHttp=new XMLHttpRequest();
		}
    catch (e)
		{
			 try
			  {
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			  }
		 catch (e)
			  {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			  }
		}
	return xmlHttp;
}

/*************************************************************************************************************************************************
Purpose : Remove the space.
Input   : Nobe.
Return  : Overrides the existing string trim function.
*************************************************************************************************************************************************/
String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

/*************************************************************************************************************************************************
Purpose : Email address validation.
Input   : email addresss = [ strEmailAddress ].
Return  : true = valid email address , false = invalid email address.
*************************************************************************************************************************************************/
function validateEmailAddress(strEmailAddress)
{
	var str=strEmailAddress;
	var filter=/^.+@.+\..{2,3}$/

	if (filter.test(str))
			return(true);
	else 
		return(false); 
}
 
/*************************************************************************************************************************************************
Purpose : Adding item in the shopping cart. if session is not exists then simply redirect user to login the system.
Input   : ProductCode = [ pProductCode ],
		  User Code = [ userCode ].
Return  : None.
*************************************************************************************************************************************************/
function addingIetmInShoppingCart(pProductCode,userCode,pQuantity)
{
	doOpreation("ajaxOpreation.php?opreation=8&userCode="+userCode+"&productCode="+pProductCode+"&productQuantity="+document.getElementById(pQuantity).value,8);
}

/*************************************************************************************************************************************************
Purpose : Calculation of the item row price.
Input   : pQuantity = [ Selected Quantity ],
		  pUnitPrice = [ Product Unit Price ], 
		  pRowTotal = [ Row Total ].
Return  : product sum.
*************************************************************************************************************************************************/
function calculateRowPrice(pQuantity , pUnitPrice , pRowTotal )// , pSubTotal , pShippingCharges , pDiscountAmount , pGrandTotal)
{
	document.getElementById(pRowTotal).innerHTML = "&pound; " + (pQuantity * getCost(document.getElementById(pUnitPrice).innerHTML)).toFixed(2);
	calculateShoppingCartPrice(document.getElementById('txtNumberOfItem').value);
}

/*************************************************************************************************************************************************
Purpose : Calculating Shopping cart Footer.
Input   : Total number of items = [ pTotalnumberOfItem ].
Return  : Shopping Cart Footer Sum.
*************************************************************************************************************************************************/
function calculateShoppingCartPrice(pTotalnumberOfItem)
{
	var strRowTotal , dblSubTotal , dblShippingAmount , dblDiscountAmount , dblGrandTotal , dblShowFooter;
	 
	dblSubTotal = 0;
	dblGrandTotal = 0
	dblShowFooter = document.getElementById("txtShowFooter").value;
	if(pTotalnumberOfItem == "")
		intTOtalNumberOfItem = document.getElementById('txtNumberOfItem').value;
	else
		intTOtalNumberOfItem = pTotalnumberOfItem;
	
	for(var intCounterForLoop = 1 ; intCounterForLoop <= intTOtalNumberOfItem; intCounterForLoop++)
	{
		strRowTotal = "divTotal"+intCounterForLoop;
		dblSubTotal = dblSubTotal + parseFloat(getCost(document.getElementById(strRowTotal).innerHTML));
	}
	
	document.getElementById('divSubTotal').innerHTML = "&pound; " + dblSubTotal.toFixed(2);

	if(intTOtalNumberOfItem == -1)
	{
		dblSubTotal = getCost(document.getElementById('divSubTotal').innerHTML);

		if(document.getElementById('divShippingCharges').innerHTML == "")
			{
				document.getElementById('divShippingCharges').innerHTML = "&pound 0.00";
				dblShippingAmount = 0;
			}
		else
			dblShippingAmount  = getCost(document.getElementById('divShippingCharges').innerHTML);

		if(document.getElementById('divDiscountAmount').innerHTML == "")
			{
				document.getElementById('divDiscountAmount').innerHTML = "&pound 0.00";
				dblDiscountAmount = 0;
			}
		else
			dblDiscountAmount = getCost(document.getElementById('divDiscountAmount').innerHTML);

	 
			dblGrandTotal = ((parseFloat(dblSubTotal) + parseFloat(dblShippingAmount)) - parseFloat(dblDiscountAmount)) ;
	
		document.getElementById('divGrandTotal').innerHTML = "&pound; " + (dblGrandTotal).toFixed(2);
	}
}

/*************************************************************************************************************************************************
Purpose : Getting nueric value from string.
Input   : pValue = [ passed value ].
Return  : Numeric digit.
*************************************************************************************************************************************************/
function getCost(pValue)
{
	var strCost;
	strCost = pValue;
	return((strCost.substring(2)).trim());
}
/*************************************************************************************************************************************************
Purpose : Adding selected item in shopping cart.
Input   : pProductCode = [ Product Code ],
	      pQuantyty = [ Quantity ],
		  pDivObject  = [ Div Object Id to display the message ]
Return  : Numeric digit.
*************************************************************************************************************************************************/
function addItemInShoppingCart(pProductCode , pQuantity , pDivObject)
	{
		divIdCode = pDivObject;
		doOpreation("ajaxOpreation.php?opreation=8&productCode="+pProductCode+"&productQuantity="+pQuantity,2);		 
	}
function addDealItemInShoppingCart(pProductCode , pQuantity , pDivObject)
	{
		divIdCode = pDivObject;
 		doOpreation("ajaxOpreation.php?opreation=8&productCode="+pProductCode+"&productQuantity="+pQuantity+"&isdeal=1",2);
	}
function addItemInShoppingCartOther(pProductCode , pQuantity , pDivObject)
	{
		divIdCode = pDivObject;
		doOpreation("ajaxOpreation.php?opreation=8&productCode="+pProductCode+"&productQuantity="+pQuantity+"&pDesgin=1",2);		 
	}
function setOtherOrderPanel()
{
		var strProductID;
		var intTotalNumberOfElement = (document.getElementById('hyudsyudsbc6484dchyff').value);
 
		for(var intCounter = 1 ; intCounter < intTotalNumberOfElement ; intCounter++)
		{
			strProductID = "divConformation"+intCounter;
			
			if( divIdCode != strProductID)
				document.getElementById(strProductID).style.display="none";
			else
				document.getElementById(strProductID).style.display="block";
		}
}
function displayFloatingDiv(divId, title, width, height, left, top)
{
    DivID = divId;

    document.getElementById('dimmer').style.visibility = "visible";

    document.getElementById(divId).style.width = width + 'px';
    document.getElementById(divId).style.height = height + 'px';
    document.getElementById(divId).style.left = left + 'px';
    document.getElementById(divId).style.top = top + 'px';

    var addHeader , originalDivHTML;

    if (originalDivHTML == "")
        originalDivHTML = document.getElementById(divId).innerHTML;

    addHeader = '<table style="width:' + width + 'px" class="floatingHeader">' +
                '<tr><td ondblclick="void(0);" onmouseover="over=true;" onmouseout="over=false;" style="cursor:move;height:18px" class="normal_text">' + title + '</td>' +
                '<td style="width:18px" align="right"><a href="javascript:hiddenFloatingDiv(\'' + divId + '\');void(0);">' +
                '<img title="Close..." alt="Close..." src="images/close.jpg" border="0" /</a></td></tr></table>';


    // add to your div an header
    document.getElementById(divId).innerHTML = addHeader + originalDivHTML;


    document.getElementById(divId).className = 'dimming';
    document.getElementById(divId).style.visibility = "visible";
}

function handleEvent(oEvent) {
    intxPosition  = oEvent.screenX;
	intYPosition   = oEvent.screenY;	 
}

function showImage(pProductCode , pImageCounter)
{
	window.open("galleryImage.php?productCode="+pProductCode+"&imagecounter="+pImageCounter,"","location=0,status=1,scrollbars=0,width=800,height=650,resizable=0");
}

function setMenu(pObjetcCode, pAction)
{
	document.getElementById(pObjetcCode).style.display = pAction;
	
	if(pObjetcCode == "divSearch")
		window.setTimeout("hideSearch()", (15 * 1000));
}
function hideSearch()
{
	document.getElementById("divSearch").style.display = "none";
}
function checkingForSearchObject()
{
	var strSearchValue ;
	strSearchValue = document.getElementById("txtSearch").value;
	if(strSearchValue.trim() == "")
	{
		return false;
	}
}

function validateEmailAddress(pStrEmailAddress) 
	{
   		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	    var address = pStrEmailAddress;
   		if(reg.test(address) == false) 
		{
      		return false;
   		}
		else
		{
			return true;
		}		
	}
	
var animatedcollapse={
divholders: {}, //structure: {div.id, div.attrs, div.$divref}
divgroups: {}, //structure: {groupname.count, groupname.lastactivedivid}
lastactiveingroup: {}, //structure: {lastactivediv.id}

show:function(divids){ //public method
	if (typeof divids=="object"){
		for (var i=0; i<divids.length; i++)
			this.showhide(divids[i], "show")
	}
	else
		this.showhide(divids, "show")
},

hide:function(divids){ //public method
	if (typeof divids=="object"){
		for (var i=0; i<divids.length; i++)
			this.showhide(divids[i], "hide")
	}
	else
		this.showhide(divids, "hide")
},

toggle:function(divid){ //public method
	this.showhide(divid, "toggle")
},

addDiv:function(divid, attrstring){ //public function
	this.divholders[divid]=({id: divid, $divref: null, attrs: attrstring})
	this.divholders[divid].getAttr=function(name){ //assign getAttr() function to each divholder object
		var attr=new RegExp(name+"=([^,]+)", "i") //get name/value config pair (ie: width=400px,)
		return (attr.test(this.attrs) && parseInt(RegExp.$1)!=0)? RegExp.$1 : null //return value portion (string), or 0 (false) if none found
	}
},

showhide:function(divid, action){
 
	if(document.getElementById("divRevieDetailsPanel").style.display == "block")
			document.getElementById("divRevieDetailsPanel").style.display = "none";		
		else
			document.getElementById("divRevieDetailsPanel").style.display = "block";

	var $divref=this.divholders[divid].$divref //reference collapsible DIV
	if (this.divholders[divid] && $divref.length==1){ //if DIV exists
		var targetgroup=this.divgroups[$divref.attr('groupname')] //find out which group DIV belongs to (if any)
		if ($divref.attr('groupname') && targetgroup.count>1 && (action=="show" || action=="toggle" && $divref.css('display')=='none')){ //If current DIV belongs to a group
			if (targetgroup.lastactivedivid && targetgroup.lastactivedivid!=divid) //if last active DIV is set
				this.slideengine(targetgroup.lastactivedivid, 'hide') //hide last active DIV within group first
				this.slideengine(divid, 'show')
			targetgroup.lastactivedivid=divid //remember last active DIV
		}
		else{
			this.slideengine(divid, action)
		}
	}
},

slideengine:function(divid, action){
	var $divref=this.divholders[divid].$divref
	if (this.divholders[divid] && $divref.length==1){ //if this DIV exists
		var animateSetting={height: action}
		if ($divref.attr('fade'))
			animateSetting.opacity=action
		$divref.animate(animateSetting, $divref.attr('speed')? parseInt($divref.attr('speed')) : 500)
		return false
	}
},

generatemap:function(){
	var map={}
	for (var i=0; i<arguments.length; i++){
		if (arguments[i][1]!=null){
			map[arguments[i][0]]=arguments[i][1]
		}
	}
	return map
},

init:function(){
	var ac=this
	jQuery(document).ready(function($){
		var persistopenids=ac.getCookie('acopendivids') //Get list of div ids that should be expanded due to persistence ('div1,div2,etc')
		var groupswithpersist=ac.getCookie('acgroupswithpersist') //Get list of group names that have 1 or more divs with "persist" attribute defined
		if (persistopenids!=null) //if cookie isn't null (is null if first time page loads, and cookie hasnt been set yet)
			persistopenids=(persistopenids=='nada')? [] : persistopenids.split(',') //if no divs are persisted, set to empty array, else, array of div ids
		groupswithpersist=(groupswithpersist==null || groupswithpersist=='nada')? [] : groupswithpersist.split(',') //Get list of groups with divs that are persisted
		jQuery.each(ac.divholders, function(){ //loop through each collapsible DIV object
			this.$divref=$('#'+this.id)
			if ((this.getAttr('persist') || jQuery.inArray(this.getAttr('group'), groupswithpersist)!=-1) && persistopenids!=null){
				var cssdisplay=(jQuery.inArray(this.id, persistopenids)!=-1)? 'block' : 'none'
			}
			else{
				var cssdisplay=this.getAttr('hide')? 'none' : null
			}
			this.$divref.css(ac.generatemap(['height', this.getAttr('height')], ['display', cssdisplay]))
			this.$divref.attr(ac.generatemap(['groupname', this.getAttr('group')], ['fade', this.getAttr('fade')], ['speed', this.getAttr('speed')]))
			if (this.getAttr('group')){ //if this DIV has the "group" attr defined
				var targetgroup=ac.divgroups[this.getAttr('group')] || (ac.divgroups[this.getAttr('group')]={}) //Get settings for this group, or if it no settings exist yet, create blank object to store them in
				targetgroup.count=(targetgroup.count||0)+1 //count # of DIVs within this group
				if (!targetgroup.lastactivedivid && this.$divref.css('display')!='none' || cssdisplay=="block") //if this DIV was open by default or should be open due to persistence								
					targetgroup.lastactivedivid=this.id //remember this DIV as the last "active" DIV (this DIV will be expanded)
				this.$divref.css({display:'none'}) //hide any DIV that's part of said group for now
			}
		}) //end divholders.each
		jQuery.each(ac.divgroups, function(){ //loop through each group
			if (this.lastactivedivid)
				ac.divholders[this.lastactivedivid].$divref.show() //and show last "active" DIV within each group (one that should be expanded)
		})
		var $allcontrols=$('*[rel]').filter('[@rel^="collapse-"], [@rel^="expand-"], [@rel^="toggle-"]') //get all elements on page with rel="collapse-", "expand-" and "toggle-"
		var controlidentifiers=/(collapse-)|(expand-)|(toggle-)/
		$allcontrols.each(function(){
			$(this).click(function(){
				var relattr=this.getAttribute('rel')
				var divid=relattr.replace(controlidentifiers, '')
				var doaction=(relattr.indexOf("collapse-")!=-1)? "hide" : (relattr.indexOf("expand-")!=-1)? "show" : "toggle"
				return ac.showhide(divid, doaction)
			}) //end control.click
		})// end control.each
		$(window).bind('unload', function(){
			ac.uninit()
		})
	}) //end doc.ready()
},

uninit:function(){
	var opendivids='', groupswithpersist=''
	jQuery.each(this.divholders, function(){
		if (this.$divref.css('display')!='none'){
			opendivids+=this.id+',' //store ids of DIVs that are expanded when page unloads: 'div1,div2,etc'
		}
		if (this.getAttr('group') && this.getAttr('persist'))
			groupswithpersist+=this.getAttr('group')+',' //store groups with which at least one DIV has persistance enabled: 'group1,group2,etc'
	})
	opendivids=(opendivids=='')? 'nada' : opendivids.replace(/,$/, '')
	groupswithpersist=(groupswithpersist=='')? 'nada' : groupswithpersist.replace(/,$/, '')
	this.setCookie('acopendivids', opendivids)
	this.setCookie('acgroupswithpersist', groupswithpersist)
},

getCookie:function(Name){ 
	var re=new RegExp(Name+"=[^;]*", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
},

setCookie:function(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; path=/; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value+"; path=/"
}

}
/**************************************************************************************************************************/
/*									Review, New Product, New Update, Stock Added  							  			  */
/**************************************************************************************************************************/

function setActivedSearch()
	{
		if(document.getElementById("txtsearch").value == "Type here to search")
		{
			document.getElementById("txtsearch").value = "";
		}
	}
function setDeactiveSearch()
	{
		if(document.getElementById("txtsearch").value == "")
		{
			document.getElementById("txtsearch").value = "Type here to search";
		}
	}
function searchCheck()
{
	if((document.frmSearch.txtsearch.value == "") || (document.frmSearch.txtsearch.value == null) || (document.frmSearch.txtsearch.value == "Type here to search"))
	{
		return false;
	}
}
function setDectiveBox(pObjectIndex)
{
	var strObject = "whats-new-product-bottom-"+pObjectIndex;
	document.getElementById(strObject).className = "whats-new-product-bottom";
	strObject = "productname"+pObjectIndex;
 	document.getElementById(strObject).className = "whats-new-rolout-color";
	strObject = "productmoreinof"+pObjectIndex;
 	document.getElementById(strObject).className = "whats-new-rolout-color";
	
	if(intOverValue == 1)
	{
		strObject = "productdetails"+pObjectIndex;
 		document.getElementById(strObject).className = "whats-new-rolout-color";
	}
}
function setActiveBox(pObjectIndex)
{
	var strObject = "whats-new-product-bottom-"+pObjectIndex;
	document.getElementById(strObject).className = "whats-new-product-bottom-swap";
	strObject = "productname"+pObjectIndex;
 	document.getElementById(strObject).className = "whats-new-rolover-color";
	strObject = "productmoreinof"+pObjectIndex;
 	document.getElementById(strObject).className = "whats-new-rolover-color";	
	
	if(intOverValue == 1)
	{
		strObject = "productdetails"+pObjectIndex;
 		document.getElementById(strObject).className = "whats-new-rolover-color";
	}
}

/**************************************************************************************************************************/
/*									FAQ, Purchase Online, Warranty Info and Tearm & Condition							  */
/**************************************************************************************************************************/
function showFaqAnswerPanel(pAnswerPanelObject)
{
	var strObject, strRollOverObject;
	for(var intCounter = 1; intCounter < (intNumberOfQuestion +1); intCounter++)
	{
		strObject = "div"+intCounter;
		strRollOverObject = "faq_expand_panel_"+intCounter;
		if(pAnswerPanelObject == intCounter)
			{
				if(blnHideStatus == false)
					{
						blnHideStatus = true;
					}
				else
					{
						if(document.getElementById(strObject).style.display == "block")
							{
								document.getElementById(strObject).style.display = "none";
								document.getElementById(strRollOverObject).className = "faq_expand_panel";
							}
						else
							{
								document.getElementById(strObject).style.display = "block";
								document.getElementById(strRollOverObject).className = "faq_expand_alternative_panel";
							}
					}
				
			}
		else
			{
				document.getElementById(strObject).style.display = "none";
				document.getElementById(strRollOverObject).className = "faq_expand_panel";
			}
	}
}
		
function showRollOverEffect(pAnswerPanelObject, pStatus)
	{
		var strRollOverObject, strRollOverExpandObject, strDivObject;
		strRollOverObject = "faq_question_panel_"+pAnswerPanelObject;
		strRollOverExpandObject = "faq_expand_panel_"+pAnswerPanelObject;
		strDivObject = "div"+pAnswerPanelObject;
		if(pStatus ==1)
			{
 				document.getElementById(strRollOverObject).className = "faq_question_panel_alternative";
 				
				if((document.getElementById(strDivObject).style.display == "none") || (document.getElementById(strDivObject).style.display == ""))
					document.getElementById(strRollOverExpandObject).className = "faq_expand_over_panel";
				else
					document.getElementById(strRollOverExpandObject).className = "faq_expand_over_alternative_panel";
				
			}
		else
			{
				document.getElementById(strRollOverObject).className = "faq_question_panel";				
				if((document.getElementById(strDivObject).style.display == "none") || (document.getElementById(strDivObject).style.display == ""))
					document.getElementById(strRollOverExpandObject).className = "faq_expand_panel";
				else
					document.getElementById(strRollOverExpandObject).className = "faq_expand_alternative_panel";
			}
	}
function donothide(intCounter)
	{
		blnHideStatus = false;
	}
/**************************************************************************************************************************/

/**************************************************************************************************************************/
/*												Button Mouser Over Effect 							  					  */
/**************************************************************************************************************************/
function setOverImage(pObjectId , pImageName)
	{
		document.getElementById(pObjectId).src = "/images/buttons/"+pImageName+".png";
	}
/**************************************************************************************************************************/
/*												Images Mouser Over Effect 							  					  */
/**************************************************************************************************************************/
function setOverEffect(pObjectId , pImageName)
	{
		document.getElementById(pObjectId).src = "/images/"+pImageName+".png";
	}
/*************************************************************************************************************************************************
Purpose : Set Number iof the item added in the shopping cart.
Input   : Total Quantlty = [ pQuantity ].
Return  : None.
*************************************************************************************************************************************************/
function setNumbeerOfQuantity(pQuantity)
	{
		if(pQuantity == "")
			pQuantity = "0";
		
		var intNumberOfItem = document.getElementById('ukhdmimenushoppingitems').innerHTML;
		
		document.getElementById('ukhdmimenushoppingitems').innerHTML = intNumberOfItem;		 
	}

$(document).ready(function(){
		$('.ukhdmi-rht-middle-section-1').hover(function(){
			$(this).find('div.ukhdmi-rht-middle-more').css({'background-image':'url(christmas/more-detail-over.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).find('div.ukhdmi-rht-middle-more').css({'background-image':'url(christmas/more-detail.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
		
		$('.ukhdmi-rht-middle-section-deals').hover(function(){
			$(this).find('div.ukhdmi-rht-middle-more').css({'background-image':'url(christmas/more-detail-over.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).find('div.ukhdmi-rht-middle-more').css({'background-image':'url(christmas/more-detail.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
		
		$('.ukhdmi-rht-middle-octava').hover(function(){
			$(this).css({'background-image':'url(christmas/octiva_over.png)', 'background-position':'10px 44px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).css({'background-image':'url(christmas/octiva.png)', 'background-position':'10px 44px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
		
		$('.ukhdmi-rht-middle-cablesson').hover(function(){
			$(this).css({'background-image':'url(christmas/cablesson_over.png)', 'background-position':'5px 10px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).css({'background-image':'url(christmas/cablesson.png)', 'background-position':'5px 10px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});

		$('.ukhdmi-rht-middle-fedex').hover(function(){
			$(this).css({'background-image':'url(christmas/fedex_over.png)', 'background-position':'10px 10px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).css({'background-image':'url(christmas/fedex.png)', 'background-position':'10px 10px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
		
		$('.ukhdmi-rht-middle-force').hover(function(){
			$(this).css({'background-image':'url(christmas/parcelforce_over.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).css({'background-image':'url(christmas/parcelforce.png)', 'background-position':'0px 0px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
		
		$('.ukhdmi-rht-middle-royal').hover(function(){
			$(this).css({'background-image':'url(christmas/royal_mail_over.png)', 'background-position':'0px 10px', 'background-repeat':'no-repeat'});
		}, function(){
			$(this).css({'background-image':'url(christmas/royal_mail.png)', 'background-position':'0px 10px', 'background-repeat':'no-repeat'});
		}).css({'cursor':'pointer'});
	});
