function ShowPopUp(URL, Wdth, Hght, Scroll, Resize) {
	window.open(URL, 'popup', 'toolbar=0, scrollbars=' + Scroll +', location=0, statusbar=0, menubar=0, resizable=' + Resize + ', width=' + Wdth + ', height=' + Hght + ', left=150, top=50');
}

function ShowAboutIgnify(URL, Wdth, Hght, Scroll, Resize) {
	window.open(URL, 'popup', 'toolbar=0, menubar= 0 , scrollbars=' + Scroll +', location=0, statusbar=0, menubar=0, resizable=' + Resize + ', width=' + Wdth + ', height=' + Hght + ', left=350, top=300');

}
/***********************************Addition By Uzma For ToolTip*******************************************/
/***********************dw_event.js**************************/
var dw_event = {
  
  add: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
    else if (obj.attachEvent) obj.attachEvent("on" + etype, fp);
  }, 

  remove: function(obj, etype, fp, cap) {
    cap = cap || false;
    if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap);
    else if (obj.detachEvent) obj.detachEvent("on" + etype, fp);
  }, 

  DOMit: function(e) { 
    e = e? e: window.event;
    e.tgt = e.srcElement? e.srcElement: e.target;
    
    if (!e.preventDefault) e.preventDefault = function () { return false; }
    if (!e.stopPropagation) e.stopPropagation = function () { if (window.event) window.event.cancelBubble = true; }
        
    return e;
  }
  
}
/**************************************************************/
/************************dw_viewport.js************************/
var viewport = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 18;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollX: function () {
    this.scrollX = 0;
  	if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
  	else if (document.documentElement && document.documentElement.scrollLeft)
  		this.scrollX = document.documentElement.scrollLeft;
  	else if (document.body && document.body.scrollLeft) 
  		this.scrollX = document.body.scrollLeft; 
  	else if (window.scrollX) this.scrollX = window.scrollX;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();
    this.getScrollX();  this.getScrollY();
  }
  
}
/**************************************************************/
/**************************dw_tooltip.js***********************/


var Tooltip = {
    followMouse: true,
    offX: 8,
    offY: 12,
    tipID: "tipDiv",
    showDelay: 100,
    hideDelay: 200,
    
    ready:false, timer:null, tip:null, 
  
    init: function() {  
        if ( document.createElement && document.body && typeof document.body.appendChild != "undefined" ) {
            if ( !document.getElementById(this.tipID) ) {
                var el = document.createElement("DIV");
                el.id = this.tipID; document.body.appendChild(el);
            }
            this.ready = true;
        }
    },
    
    show: function(e, msg) {
        if (this.timer) { clearTimeout(this.timer);	this.timer = 0; }
        this.tip = document.getElementById( this.tipID );
        if (this.followMouse) // set up mousemove 
            dw_event.add( document, "mousemove", this.trackMouse, true );
        this.writeTip("");  // for mac ie
        this.writeTip(msg);
        viewport.getAll();
        this.positionTip(e);
        this.timer = setTimeout("Tooltip.toggleVis('" + this.tipID + "', 'visible')", this.showDelay);
    },
    
    writeTip: function(msg) {
        if ( this.tip && typeof this.tip.innerHTML != "undefined" ) this.tip.innerHTML = msg;
    },
    
    positionTip: function(e) {
        if ( this.tip && this.tip.style ) {
            // put e.pageX/Y first! (for Safari)
            var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
            var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
    
            if ( x + this.tip.offsetWidth + this.offX > viewport.width + viewport.scrollX ) {
                x = x - this.tip.offsetWidth - this.offX;
                if ( x < 0 ) x = 0;
            } else x = x + this.offX;
        
            if ( y + this.tip.offsetHeight + this.offY > viewport.height + viewport.scrollY ) {
                y = y - this.tip.offsetHeight - this.offY;
                if ( y < viewport.scrollY ) y = viewport.height + viewport.scrollY - this.tip.offsetHeight;
            } else y = y + this.offY;
            
            this.tip.style.left = x + "px"; this.tip.style.top = y + "px";
        }
    },
    
    hide: function() {
        if (this.timer) { clearTimeout(this.timer);	this.timer = 0; }
        this.timer = setTimeout("Tooltip.toggleVis('" + this.tipID + "', 'hidden')", this.hideDelay);
        if (this.followMouse) // release mousemove
            dw_event.remove( document, "mousemove", this.trackMouse, true );
        this.tip = null; 
    },

    toggleVis: function(id, vis) { // to check for el, prevent (rare) errors
        var el = document.getElementById(id);
        if (el) el.style.visibility = vis;
    },
    
    trackMouse: function(e) {
    	e = dw_event.DOMit(e);
     	Tooltip.positionTip(e);
    }
    
}

/**************************************************************/

Tooltip.offX = 4;  
Tooltip.offY = 4;
Tooltip.followMouse = false;

Tooltip.timerId = 0;
function doTooltip(e, msg) 
{
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.clearTimer();
  var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
  if ( tip && tip.onmouseout == null ) 
  {
      tip.onmouseout = Tooltip.tipOutCheck;
      tip.onmouseover = Tooltip.clearTimer;
  }
  Tooltip.show(e, msg);
}

function hideTip() 
{
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 300);
}

Tooltip.tipOutCheck = function(e) 
{
  e = dw_event.DOMit(e);
  // is element moused into contained by tooltip?
  var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
  if ( this != toEl && !contained(toEl, this) ) Tooltip.hide();
}

function hideTipImmediate() 
{
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 0);
}

// returns true of oNode is contained by oCont (container)
function contained(oNode, oCont) 
{
  if (!oNode) return; // in case alt-tab away while hovering (prevent error)
  while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true;
  return false;
}
Tooltip.clearTimer = function() 
{
  if (Tooltip.timerId) { clearTimeout(Tooltip.timerId); Tooltip.timerId = 0; }
}

Tooltip.unHookHover = function () 
{
    var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
    if (tip) 
    {
        tip.onmouseover = null; 
        tip.onmouseout = null;
        tip = null;
    }
}
dw_event.add(window, "unload", Tooltip.unHookHover, true);
/***********************************Adds By Uzma For ToolTip*******************************************/

//------------------------------Added By Jeevan------------------------------------//
function TitleCase(STRING){var Exceptions = "About/about|Above/above|Across/across|After/after|Against/against|Around/around|At/at|Before/before|Behind/behind|Below/below|Beneath/beneath|Beside/beside|Besides/besides|Between/between|Beyond/beyond|By/by|Down/down|During/during|Except/except|For/for|From/from|In/in|Inside/inside|Into/into|Like/like|Near/near|Of/of|Off/off|On/on|Out/out|Outside/outside|Over/over|Since/since|Through/through|Throughout/throughout|Till/till|To/to|Toward/toward|Under/under|Until/until|Up/up|Upon/upon|With/with|Without/without";var arrExceptions = Exceptions.split("|");STRING = PCase(STRING);var arrExValues;

for(var iEx = 0; iEx < arrExceptions.length;iEx++){
arrExValues = arrExceptions[iEx].split("/");
var SearchThisValue = " " + arrExValues[0] + " ";
var ReplaceThisValue = " " + arrExValues[1] + " ";
while(STRING.indexOf(SearchThisValue)>-1){
STRING = STRING.replace(SearchThisValue,ReplaceThisValue);
}

}

return STRING;
} //End Function

function Eval(STRING){
eval(STRING);
}

function GetDate(FORMAT){
var m_TODAY = new Date();
var m_Day = m_TODAY.getDate();
var m_Month = (m_TODAY.getMonth()+1)
var MY_DATE = m_Day + "/" + m_Month + "/" + m_TODAY.getYear();

if(!FORMAT){
FORMAT = "mm/dd/yyyy";
MY_DATE = m_Month + "/" + m_Day + "/" + m_TODAY.getYear();
}
MY_DATE = FormatDate(MY_DATE,FORMAT);
return MY_DATE;
}


function strComp(STRING1,STRING2,COMPARE){
if(IsNull(COMPARE)){
COMPARE = 1;
}
if(CBool(COMPARE)){
STRING1 = STRING1.toLowerCase();
STRING2 = STRING2.toLowerCase();
}

if(STRING1==STRING2){
return true;
}else
{
return false;
}
}


function IsNull(ITEM){
if(ITEM == null || ITEM == undefined){
return true;
}
return false;
}


function IsArray(MY_ARRAY){
MY_ARRAY = MY_ARRAY.constructor.toString();
if(InStr(MY_ARRAY,"Array") > 0){
return true;
}
else{
return false;
}
}


function CreateObject(STRING){
var MY_OBJECT = new ActiveXObject(STRING);
return MY_OBJECT
}


function FormatPercent(NUMBER,PLACES){
NUMBER = NUMBER * 100
if(PLACES){
NUMBER = Round(NUMBER,PLACES);
}
else{
NUMBER = Round(NUMBER,2);
NUMBER = FormatCurrency(NUMBER);
}

NUMBER += "%";
return NUMBER;
}


function PCase(STRING){
var strReturn_Value = "";
var iTemp = STRING.length;
if(iTemp==0){
return"";
}
var UcaseNext = false;
strReturn_Value += STRING.charAt(0).toUpperCase();
for(var iCounter=1;iCounter < iTemp;iCounter++){
if(UcaseNext == true){
strReturn_Value += STRING.charAt(iCounter).toUpperCase();
}
else{
strReturn_Value += STRING.charAt(iCounter).toLowerCase();
}
var iChar = STRING.charCodeAt(iCounter);
if(iChar == 32 || iChar == 45 || iChar == 46){
UcaseNext = true;
}
else{
UcaseNext = false
}
if(iChar == 99 || iChar == 67){
if(STRING.charCodeAt(iCounter-1)==77 || STRING.charCodeAt(iCounter-1)==109){
UcaseNext = true;
}
}


} //End For

return strReturn_Value;

}


function Now(){
var NOW = new Date().toString();
var arrNOW = NOW.split("UTC")
NOW = arrNOW[0];
return NOW;
}

function FormatCurrency(FIGURE){
if(!FIGURE||FIGURE==""){
return "0.00";
}
var strTemp = FIGURE.toString();
while(strTemp.indexOf(",") > -1){
strTemp = strTemp.replace(",","");
}

strTemp = parseFloat(strTemp);

FIGURE = Round(FIGURE,2);
FIGURE = FIGURE.toString();
var Place = FIGURE.indexOf(".");
if(Place >-1){
	if((FIGURE.length - Place) == 2){
	FIGURE += "0";
	}
}
else{
FIGURE += ".00";
}

if(FIGURE=="0.00"){
return"";
}

return FIGURE;

}



function Round(NUMBER,PLACES){
if(!IsNumeric(NUMBER)){
return "0";
}
NUMBER = CStr(NUMBER);
arrNUMBER = NUMBER.split(".");
if(arrNUMBER.length==1){return NUMBER;}
if(PLACES){
NUMBER = Math.round(NUMBER*Math.pow(10,PLACES))/Math.pow(10,PLACES);
}
else{
NUMBER = Math.round(NUMBER);
}
return NUMBER;
}


function Join(ARRAY,DELIMITER){
ARRAY = ARRAY.toString();
if(DELIMITER){
ARRAY = Replace(ARRAY,",",DELIMITER);
}
else{
ARRAY = Replace(ARRAY,","," ");
}

return ARRAY;
}


function FormatDate(DateToFormat,FormatAs){
if(DateToFormat==""){return"";}
if(!FormatAs){FormatAs="dd/mm/yyyy";}

var strReturnDate;
FormatAs = FormatAs.toLowerCase();
DateToFormat = DateToFormat.toLowerCase();
var arrDate
var arrMonths = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var strMONTH;
var Separator;

while(DateToFormat.indexOf("st")>-1){
DateToFormat = DateToFormat.replace("st","");
}

while(DateToFormat.indexOf("nd")>-1){
DateToFormat = DateToFormat.replace("nd","");
}

while(DateToFormat.indexOf("rd")>-1){
DateToFormat = DateToFormat.replace("rd","");
}

while(DateToFormat.indexOf("th")>-1){
DateToFormat = DateToFormat.replace("th","");
}

if(DateToFormat.indexOf(".")>-1){
Separator = ".";
}

if(DateToFormat.indexOf("-")>-1){
Separator = "-";
}


if(DateToFormat.indexOf("/")>-1){
Separator = "/";
}

if(DateToFormat.indexOf(" ")>-1){
Separator = " ";
}

arrDate = DateToFormat.split(Separator);
DateToFormat = "";
	for(var iSD = 0;iSD < arrDate.length;iSD++){
		if(arrDate[iSD]!=""){
		DateToFormat += arrDate[iSD] + Separator;
		}
	}
DateToFormat = DateToFormat.substring(0,DateToFormat.length-1);
arrDate = DateToFormat.split(Separator);

if(arrDate.length < 3){
return "";
}

var DAY = arrDate[0];
var MONTH = arrDate[1];
var YEAR = arrDate[2];




if(parseFloat(arrDate[1]) > 12){
DAY = arrDate[1];
MONTH = arrDate[0];
}

if(parseFloat(DAY) && DAY.toString().length==4){
YEAR = arrDate[0];
DAY = arrDate[2];
MONTH = arrDate[1];
}


for(var iSD = 0;iSD < arrMonths.length;iSD++){
var ShortMonth = arrMonths[iSD].substring(0,3).toLowerCase();
var MonthPosition = DateToFormat.indexOf(ShortMonth);
	if(MonthPosition > -1){
	MONTH = iSD + 1;
		if(MonthPosition == 0){
		DAY = arrDate[1];
		YEAR = arrDate[2];
		}
	break;
	}
}

var strTemp = YEAR.toString();
if(strTemp.length==2){

	if(parseFloat(YEAR)>40){
	YEAR = "19" + YEAR;
	}
	else{
	YEAR = "20" + YEAR;
	}

}


	if(parseInt(MONTH)< 10 && MONTH.toString().length < 2){
	MONTH = "0" + MONTH;
	}
	if(parseInt(DAY)< 10 && DAY.toString().length < 2){
	DAY = "0" + DAY;
	}
	switch (FormatAs){
	case "dd/mm/yyyy":
	return DAY + "/" + MONTH + "/" + YEAR;
	case "mm/dd/yyyy":
	return MONTH + "/" + DAY + "/" + YEAR;
	case "dd/mmm/yyyy":
	return DAY + " " + arrMonths[MONTH -1].substring(0,3) + " " + YEAR;
	case "mmm/dd/yyyy":
	return arrMonths[MONTH -1].substring(0,3) + " " + DAY + " " + YEAR;
	case "dd/mmmm/yyyy":
	return DAY + " " + arrMonths[MONTH -1] + " " + YEAR;	
	case "mmmm/dd/yyyy":
	return arrMonths[MONTH -1] + " " + DAY + " " + YEAR;
	}

return DAY + "/" + strMONTH + "/" + YEAR;;


}




function IsDate(DateToCheck){
if(DateToCheck==""){return true;}
var m_strDate = FormatDate(DateToCheck);
if(m_strDate==""){
return false;
}
var m_arrDate = m_strDate.split("/");
var m_DAY = m_arrDate[0];
var m_MONTH = m_arrDate[1];
var m_YEAR = m_arrDate[2];
if(m_YEAR.length > 4){return false;}
m_strDate = m_MONTH + "/" + m_DAY + "/" + m_YEAR;
var testDate=new Date(m_strDate);
if(testDate.getMonth()+1==m_MONTH){
return true;
} 
else{
return false;
}
}//end function



function IsNumeric(VALUE){
for(var ivA = 0; ivA < VALUE.length;ivA ++){
if(VALUE.charCodeAt(ivA) < 48 || VALUE.charCodeAt(ivA) > 57){
	if(VALUE.charCodeAt(ivA) != 46 && VALUE.charCodeAt(ivA) != 32 && VALUE.charAt(ivA) != ","){
	return false;
	}
}																					
}
return true;
}



function Asc(CHARACTER){

return CHARACTER.charCodeAt(0)

}


function Chr(CHARACTER_CODE){

return String.fromCharCode(CHARACTER_CODE);

}


function CInt(NUMBER){
return parseInt(NUMBER);
}


function CStr(VALUE){
return VALUE.toString();
}


function CSng(NUMBER){
return parseFloat(NUMBER);
}

function CDbl(NUMBER){
return parseFloat(NUMBER);
}

function CBool(VALUE){
VALUE = new String(VALUE);
VALUE = VALUE.toLowerCase();
if(VALUE== "1" || VALUE=="-1" || VALUE=="true" || VALUE == "yes"){
return true;
}
else{
return false;
}
}


function InStr(STRING,SUBSTRING,COMPARE,START){
if(START){
STRING = STRING.substring(START,STRING.length);
}
if(CBool(COMPARE) || COMPARE ==undefined){
STRING = STRING.toLowerCase();
SUBSTRING = SUBSTRING.toLowerCase();
}
if(STRING.indexOf(SUBSTRING) > -1){
return STRING.indexOf(SUBSTRING)
}
else{
return 0;
}
}


function LCase(STRING){
return STRING.toLowerCase();
}


function Left(STRING,CHARACTER_COUNT){
return STRING.substring(0,CHARACTER_COUNT);
}


function Len(STRING){
return STRING.length;
}


function Mid(STRING,START,END){
if(!START){START=0};
if(!END || END > STRING.length){END=STRING.length};
if(END!=STRING.length){END = START + END};
return STRING.substring(START,END);
}


function Replace(STRING,REPLACE_THIS,REPLACE_WITH){
while(STRING.indexOf(REPLACE_THIS) > -1){
STRING = STRING.replace(REPLACE_THIS,REPLACE_WITH);
}
return STRING;
}


function Right(STRING,CHARACTER_COUNT){

return STRING.substring((STRING.length - CHARACTER_COUNT),STRING.length);

}


function Split(STRING,CHARACTER){
return STRING.split(CHARACTER);
}


function Sqr(NUMBER){
return NUMBER * NUMBER
}


function Trim(STRING){
STRING = LTrim(STRING);
return RTrim(STRING);
}

function RTrim(STRING){
while(STRING.charAt((STRING.length -1))==" "){
STRING = STRING.substring(0,STRING.length-1);
}
return STRING;
}


function LTrim(STRING){
while(STRING.charAt(0)==" "){
STRING = STRING.replace(STRING.charAt(0),"");
}
return STRING;
}


function UBound(ARRAY){
if(IsArray(ARRAY)){
return ARRAY.length;
}
else{
return;
}
}


function UCase(STRING){
return STRING.toUpperCase();
}


function UNESCAPE(U_VALUE){
U_VALUE = unescape(U_VALUE);
while(U_VALUE.indexOf("+") > -1){
U_VALUE = U_VALUE.replace("+", " ");
}
return U_VALUE;
}

var vbCrLf = String.fromCharCode(13) + String.fromCharCode(10);
var vbTab = "	";

//------------------------------End------------------------------------//

//--------------------------Function added by jeevan for variants dropdowns-------------------------//

	var P;
	function GetXmlHttpObject()
	{ 
		var objXMLHttp=null;
		if (window.XMLHttpRequest)
		{
			objXMLHttp=new XMLHttpRequest();
			if (objXMLHttp.overrideMimeType)
				objXMLHttp.overrideMimeType('text/html');				
		}
		else if (window.ActiveXObject)
		{
			objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
			if (objXMLHttp.overrideMimeType)
				objXMLHttp.overrideMimeType('text/html');				
		}
		return objXMLHttp;
	} 
	function IsObject(Obj)
	{
		
		if(document.getElementById(Obj) == "[object]" || document.getElementById(Obj)=="[object HTMLInputElement]")
			return true;
		else
			return false;	
	}
	function stateChanged() 
	{	
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 					
			var responsetxt, responsetxtcart, responsetxtmybag;
			var ProdCode, StockStatus, PriceBlock
			responsetxt = xmlHttp.responseText;	
			if (Len(responsetxt) > 0)
			{
				//document.write (document.getElementById('imgBuyAll'));
				if (IsObject('imgBuyAll'))
				{
					document.getElementById('imgBuyAll').style.display = "";
				}
				
				var responsearr = responsetxt.split("@@");		
				var arrOfProdDetails;
				document.getElementById(P).innerHTML = responsearr[0];
				//document.getElementById(P).innerHTML = document.getElementById(P).innerHTML + "<BR>" + responsearr[1];
				document.getElementById('prod_grid_display').innerHTML = responsearr[1];
				if( Len(responsearr[2]) > 0 )
				{
					arrOfProdDetails = responsearr[2].split("~");
					ProdCode = arrOfProdDetails[0];
					StockStatus = arrOfProdDetails[1];
					PriceBlock= arrOfProdDetails[2];
					if (IsObject('Product_Code_block'))
					{
						document.getElementById('Product_Code_block').innerHTML = ProdCode;
					}
					if (IsObject('StockStatus_block'))
					{
						document.getElementById('StockStatus_block').innerHTML = StockStatus;
					}
					
					if (IsObject('PriceBlock'))
					{
						document.getElementById('PriceBlock').innerHTML =PriceBlock;
					}
					if (IsObject('addtoCartBlock'))
					{
						document.getElementById('addtoCartBlock').childNodes[0].href ="javascript:AddtoCart('" + ProdCode + "', '')";
					}
					if (IsObject('qtytextbox'))
					{
						document.getElementById('qtytextbox').style.display = 'Block'
					}
					if (IsObject('buyNowButton'))
					{
						document.getElementById('buyNowButton').style.display = 'Block'
					}
					
					
					
				}
				else
				{
					if (IsObject('qtytextbox'))
					{
						document.getElementById('qtytextbox').style.display = 'None'
					}
					if (IsObject('buyNowButton'))
					{
						document.getElementById('buyNowButton').style.display = 'None'
					}
					
					
					
					
				}
			}	
			
			
		} 
	}
	function doGetDropDowns(prodcode, arrAttributeName, CurrAttribName)
	{		
			var slqString;
			var QueryString;
			var tempArr = arrAttributeName.split("~");		
			P = prodcode;
			if ( Len(document.getElementById(CurrAttribName).value ) > 0 )
			{
				if (Len(document.getElementById('strSQLWhere').value) > 0 )
				{
					document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + " AND " + CurrAttribName + "=" ;
					document.getElementById('queryStr').value = document.getElementById('queryStr').value + "\&" + CurrAttribName + "=" ;
					if (!IsNumeric(document.getElementById(CurrAttribName).value))
						document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + "'"+ document.getElementById(CurrAttribName).value +"'"
					else
						document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + document.getElementById(CurrAttribName).value ;
					
						document.getElementById('queryStr').value = document.getElementById('queryStr').value  + document.getElementById(CurrAttribName).value ;
				}
				else
				{
					document.getElementById('strSQLWhere').value = CurrAttribName + "=" ;
					document.getElementById('queryStr').value = document.getElementById('queryStr').value + "\&" + CurrAttribName + "=" ;
					if (!IsNumeric(document.getElementById(CurrAttribName).value))
						document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + "'"+ document.getElementById(CurrAttribName).value +"'"
					else
						document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + document.getElementById(CurrAttribName).value ;
				
						document.getElementById('queryStr').value = document.getElementById('queryStr').value + document.getElementById(CurrAttribName).value ;
				}
			}
			else
			{
				document.getElementById('strSQLWhere').value = ""
				document.getElementById('queryStr').value = ""
			 for (var i= 0 ; i < UBound(tempArr) ; i++)
			 {
				if ( document.getElementById(tempArr[i])== "[object]" )
				{	
					if ( Len(document.getElementById(tempArr[i]).value) > 0 )
					{
						if (Len(document.getElementById('strSQLWhere').value) > 0 )
						{
							document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + " AND " + tempArr[i] + "=" ;
							document.getElementById('queryStr').value = document.getElementById('queryStr').value  + "\&" + tempArr[i] + "=" ; 
							
							if (!IsNumeric(document.getElementById(tempArr[i]).value))
								document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + "'"+ document.getElementById(tempArr[i]).value +"'"
							else
								document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + document.getElementById(tempArr[i]).value ;
								
								document.getElementById('queryStr').value = document.getElementById('queryStr').value  + document.getElementById(tempArr[i]).value ;
						}
						else
						{
							document.getElementById('strSQLWhere').value = tempArr[i] + "=" ;
							document.getElementById('queryStr').value = "&" + tempArr[i] + "=" ;
							
							if (!IsNumeric(document.getElementById(tempArr[i]).value))
								document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + "'"+ document.getElementById(tempArr[i]).value +"'";
							else
								document.getElementById('strSQLWhere').value = document.getElementById('strSQLWhere').value + document.getElementById(tempArr[i]).value ;
								
								document.getElementById('queryStr').value  = document.getElementById('queryStr').value + document.getElementById(tempArr[i]).value ;
						
						}
					}
				}	
			 }
			}
			QueryString = document.getElementById('queryStr').value 
			QueryString = QueryString.replace(/&/g,"%26");
			xmlHttp=GetXmlHttpObject()
			var url="retriveVariantDropDown.asp";
			url=url+"?prodcode=" + prodcode + "&arrAttributeName=" + arrAttributeName + "&strSQLWhere=" + document.getElementById('strSQLWhere').value; 
			url=url+ "&queryStr=" + QueryString +  document.getElementById('queryStr').value;
			xmlHttp.onreadystatechange=stateChanged;									
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
			
	}

//------------------------------End-----------------------------------------------------------------//
