Subversion Repositories SmartDukaan

Rev

Rev 9720 | Rev 9722 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1463 varun.gupt 1
var totalAmount = 0.00;
2
 
794 rajveer 3
$(document).ready(function(){
3830 chandransh 4
	checkIfUserHasAddress();
6561 amit.gupta 5
	if(window.location.pathname === "/cart") {
6
		changeEstimate();
7
	}
6903 anupam.sin 8
 
9
	$('.wantInsurance').change( function() {
6971 anupam.sin 10
		productId = $(this).attr('productid');
6912 anupam.sin 11
		if(this.checked) {
12
			trackEventWithGA('Insurance', 'Want Insurance', productId);
13
		}
6903 anupam.sin 14
		totalPrice = $('#totalAmountColumn').text();
15
		var initialPrice = parseFloat(totalPrice.replace(/,/g, ''));
16
		var initalNetPrice = 0.0;
17
		if($('#discountedAmount').length != 0) {
18
			initalNetPrice = parseFloat($('#discountedAmount').text().replace(/,/g, ''));
19
		}
20
		var insuranceAmount = parseFloat($('#agreeInsuranceTnc_' + productId).attr('insuranceAmount'));
21
		$(this).attr('disabled', 'disabled');
22
		//The animation will be running for 1 second
23
		var interval = parseInt(1000/(insuranceAmount/4));
24
		//If insurance amount is large we need to set a minimum possible interval. 5 ms looks safe. 
25
		if(interval < 5) {
26
			interval = 5;
27
		}
28
		if(this.checked) {
29
			$('#agreeInsuranceTncDiv_' + productId).show();
30
			//Update grand total but,
31
			//Disable the checkbox so that user can't change while animation is running 
32
 
33
			displayCounter(initialPrice, initialPrice + insuranceAmount, $('#totalAmountColumn'), "increase", interval);
34
			if($('#discountedAmount').length != 0) {
35
				displayCounter(initalNetPrice, initalNetPrice + insuranceAmount, $('#discountedAmount'), "increase", interval);
36
			}
37
		}
38
		else {
39
			var previousStatus = $('#agreeInsuranceTnc_' + productId)[0].checked;
40
			$('#agreeInsuranceTnc_' + productId)[0].checked =  false;
41
			if(previousStatus === true) {
42
				$('#agreeInsuranceTnc_' + productId).trigger('change');
43
			}
44
			$('#agreeInsuranceTncDiv_' + productId).hide();
45
 
46
			//Disable the checkbox so that user can't change while animation is running 
47
			displayCounter(initialPrice, initialPrice - insuranceAmount, $('#totalAmountColumn'), "decrease", interval);
48
			if($('#discountedAmount').length != 0) {
49
				displayCounter(initalNetPrice, initalNetPrice - insuranceAmount, $('#discountedAmount'), "decrease", interval);
50
			}
51
		}
52
		$(".payable").animate({ "background-color": "orange"}, 400 );
53
		$(".payable").animate({ "background-color": "#FFC"}, 400 );
54
	});
55
 
56
	function displayCounter(start, end, jQueryDom, direction, interval) {
57
		if(direction === "increase") {
58
			if(start + 4 < end) {
59
				start = start + 4;
60
				jQueryDom.html('<img src="/images/rupee-symbol.png" alt="Rs."> ' + formatAmount(start.toFixed(2)));
61
				window.setTimeout(function() {displayCounter(start, end, jQueryDom, direction, interval);}, interval);
62
			} else {
63
				jQueryDom.html('<img src="/images/rupee-symbol.png" alt="Rs."> ' + formatAmount(end.toFixed(2)));
64
				$('.wantInsurance').removeAttr('disabled');
65
			}
66
		} else if (direction === "decrease") {
67
			if(start + 4 > end) {
68
				start = start - 4;
69
				jQueryDom.html('<img src="/images/rupee-symbol.png" alt="Rs."> ' + formatAmount(start.toFixed(2)));
70
				window.setTimeout(function() {displayCounter(start, end, jQueryDom, direction, interval);}, interval);
71
			} else {
72
				jQueryDom.html('<img src="/images/rupee-symbol.png" alt="Rs."> ' + formatAmount(end.toFixed(2)));
73
				$('.wantInsurance').removeAttr('disabled');
74
			}
75
		}
76
	}
77
 
78
	function formatAmount(amount) {
79
		var numbers = amount.toString().split('.');
80
		var beforeDecimal = parseInt(numbers[0]);
81
		var afterDecimal = numbers[1];
82
		var finalString = '';
83
		while( beforeDecimal > 0) {
84
			if($.inArray(finalString.length, [3,6,9,12]) > -1) {
85
				finalString = ',' + finalString;
86
			}
87
			var r = beforeDecimal % 10;
88
			beforeDecimal /= 10;
89
			beforeDecimal = parseInt(beforeDecimal);
90
			finalString = r.toString() + finalString;
91
		}
92
		finalString = finalString + '.' + afterDecimal;
93
		return finalString;
94
	} 
95
 
96
	$('.agreeInsuranceTnc').change(function() {
6971 anupam.sin 97
 
6903 anupam.sin 98
		$('.agreeInsuranceTnc').attr('disabled', 'disabled');
99
		$('.wantInsurance').attr('disabled', 'disabled');
6929 anupam.sin 100
		productId = $(this).attr('productid');
6912 anupam.sin 101
		if(this.checked){
102
			trackEventWithGA('Insurance', 'Agreed to Terms', productId);
103
		}
6903 anupam.sin 104
		jQuery.ajax({
105
			type: "POST",
106
			url: "/cart!insureItem",
9301 kshitij.so 107
			data: "toInsure=" + this.checked + "&productId=" + productId + "&quantity=" + $(this).attr('quantity')+"&insurerType=1",
6903 anupam.sin 108
			success: function(response){
109
				if(response === "SUCCESS") {
110
					if ($('#agreeInsuranceTnc_' + productId)[0].checked == true) {
111
						$("#insuranceMessage").html("Your product is now insured!");
112
					} else {
113
						$("#insuranceMessage").attr('style', 'color:red;border:1px solid red;box-shadow: red 0 0 30px 1px;');
114
						$("#insuranceMessage").html("Insurance removed!");
115
					}
116
					$("#insuranceMessage").fadeIn(600, function() {
117
						window.setTimeout(function() {
118
							$("#insuranceMessage").fadeOut(800, function() {
119
								$('.agreeInsuranceTnc').removeAttr('disabled');
120
								$('.wantInsurance').removeAttr('disabled');
121
								$("#insuranceMessage").removeAttr('style');
122
							});
123
						}, 1500);
124
					});
125
				} else {
126
					//If we were not able to update user's insurance preference then let's reload.
127
					location.reload();
128
 
129
					//OR ????
130
					//window.location.href = "/exception";
131
 
132
				}
133
			},
134
			error : function(){
135
				//There was an error with AJAX call and we can't be sure what happened; 
136
				//Let us reload this page and see what was persisted in cart.
137
				location.reload();
138
			}
139
		});
140
	});
141
 
9301 kshitij.so 142
$('.dataProtection').change(function() {
143
	$('.dataProtection').attr('disabled', 'disabled');
144
		productId = $(this).attr('productid');
145
		jQuery.ajax({
146
			type: "POST",
147
			url: "/cart!insureItem",
148
			data: "toInsure=" + this.checked + "&productId=" + productId + "&quantity=" + $(this).attr('quantity') +"&insurerType=2",
149
			success: function(response){
150
				if(response === "SUCCESS") {
151
					if ($('#dataProtection_' + productId)[0].checked == true) {
152
						$("#insuranceMessage").html("Free data protection enabled!");
153
					} else {
154
						$("#insuranceMessage").attr('style', 'color:red;border:1px solid red;box-shadow: red 0 0 30px 1px;');
155
						$("#insuranceMessage").html("Free data protection disabled!");
156
					}
157
					$("#insuranceMessage").fadeIn(600, function() {
158
						window.setTimeout(function() {
159
							$("#insuranceMessage").fadeOut(800, function() {
160
								$('.dataProtection').removeAttr('disabled');
161
								$("#insuranceMessage").removeAttr('style');
162
							});
163
						}, 1500);
164
					});
165
				} else {
166
					//If we were not able to update user's insurance preference then let's reload.
167
					location.reload();
168
 
169
					//OR ????
170
					//window.location.href = "/exception";
171
 
172
				}
173
			},
174
			error : function(){
175
				//There was an error with AJAX call and we can't be sure what happened; 
176
				//Let us reload this page and see what was persisted in cart.
177
				location.reload();
178
			}
179
		});
180
	});
181
 
4453 varun.gupt 182
	$('#checkout').click(function(){
6903 anupam.sin 183
		if($('input.agreeInsuranceTnc:checkbox:not(:hidden):not(:checked)').length != 0) {
6971 anupam.sin 184
			trackEventWithGA('Insurance', 'Alert for T&C', '');
6903 anupam.sin 185
			alert('Please agree to the terms and conditions to get insurance');
186
			return false;
187
		}
3830 chandransh 188
		window.location.href = "/shipping";
189
	});
190
 
6903 anupam.sin 191
	$('#cancelInsurance').click(function() {
192
		jQuery.ajax({
193
			type: "POST",
194
			url: "/shipping!cancelInsurance",
195
			success: function(msg){
196
				//If shipping-failure.vm page was sent then send the user to cart page.
197
				if (msg.replace(/^\s+|\s+$/g,'') === "0") {
198
					window.location.href = "/cart";
199
				} else {
200
					window.location.reload();
201
				}
202
			},
203
			error: function(msg){
204
				//We don't know what happened, send the user to cart page.
205
				window.location.href = "/cart";
206
			}
207
		});
208
	});
209
 
210
	$('#companyInsurance').click(function() {
211
		$('#insuranceDetailDiv').slideUp(400);
212
		$.ajax({
213
			type: "POST",
214
			url: "/shipping!storeInsuranceDetails?addressId=" + $('#addressid').val(),
215
			data: "&guardianName=Organisation&dob=Organisation",
216
			success: function(msg){
217
				;//Don't do anything.
218
			},
219
			error: function(response) {
220
				//Don't do anything.
221
			}
222
		});
223
	});
224
 
225
	$('#dob').focusin(function() {
226
		if($(this).val() === 'Example: 18/08/1986') {
227
			$(this).val('');
228
			$(this).removeAttr('style');
229
		}
230
	});
231
 
232
 
233
	function validateDob() {
234
		var dateStr = $('#dob').val();
235
		dateStrArray = dateStr.split('/');
236
		//array[0] is day, array[1] is month, array[2] is year 
237
		//Now we will interchange the first and second placed numbers so that the date is in mm/dd/yyyy format 
238
		//which will be accepted by the Date.parse() method
239
		temp = dateStrArray[0];
240
		dateStrArray[0] = dateStrArray[1];
241
		dateStrArray[1] = temp;
6930 anupam.sin 242
		var enteredDob = new Date(Date.parse(dateStrArray.join('/')));
243
		if(isNaN(enteredDob.getFullYear())) {
6971 anupam.sin 244
			showInsuranceError('Please enter date of birth in given format');
6903 anupam.sin 245
			$('#dob').attr('style', 'color:#999;');
246
			$('#dob').val('Example: 18/08/1986');
247
			return false;
248
		}
6930 anupam.sin 249
 
250
		var today = new Date();
251
		if(today.getFullYear() - enteredDob.getFullYear() < 14) {
6971 anupam.sin 252
			showInsuranceError('You need to be at least 14 years old to get Insurance');
6930 anupam.sin 253
			$('#dob').attr('style', 'color:#999;');
254
			$('#dob').val('Example: 18/08/1986');
255
			return false;
256
		}
257
		if(today.getFullYear() - enteredDob.getFullYear() > 100) {
6971 anupam.sin 258
			showInsuranceError('Sorry but this feature is only for people below 100 years of age');
6930 anupam.sin 259
			$('#dob').attr('style', 'color:#999;');
260
			$('#dob').val('Example: 18/08/1986');
261
			return false;
262
		}
263
		$('#dob').val(enteredDob.toDateString().substring(4));
6903 anupam.sin 264
		return true;
265
	}
266
 
6971 anupam.sin 267
	function showInsuranceError(msg) {
268
		$('#insDetErr').html(msg);
269
		$('#insDetErr').slideDown(300,function(){$('#shippingDetails').one('click', clickHandler);});
270
	}
271
 
272
	function clickHandler() {
273
		$('#insDetErr').slideUp(300);
274
		$('#insDetErr').html('');
275
	}
276
 
6903 anupam.sin 277
	function focusOutHandler() {
6971 anupam.sin 278
		if($('#dob').val() === '') {
279
			$('#dob').attr('style', 'color:#999;');
280
			$('#dob').val('Example: 18/08/1986');
6903 anupam.sin 281
		} else {
282
			if(validateDob()) {
6971 anupam.sin 283
				$("#dob").animate({ "background-color": "#2789C1"}, 200 );
6903 anupam.sin 284
				$("#dob").animate({ "background-color": "white"}, 200 );
285
				$('#dob').val((new Date(Date.parse(dateStrArray.join('/')))).toDateString().substring(4));
286
			}
287
		}
288
	};
289
 
290
	$('#dob').focusout(focusOutHandler);
291
 
292
	$('#submitInsuranceDetails').hover(
293
		function() {
294
			$('#dob').unbind('focusout');
295
		}, 
296
		function() {
6930 anupam.sin 297
			$('#dob').bind('focusout', focusOutHandler);
6903 anupam.sin 298
		}
299
	);
300
 
301
 
302
	$('#submitInsuranceDetails').click(function() {
303
		if($('#guardianName').val() === '') {
6971 anupam.sin 304
			showInsuranceError('Please enter the name of your Father/Husband');
6903 anupam.sin 305
			return false;
306
		}
307
		if($('#dob').val() === '' || $('#dob').val() === 'Example: 18/08/1986') {
6971 anupam.sin 308
			showInsuranceError('Please enter your date of birth');
6903 anupam.sin 309
			return false;
310
		}
311
 
312
		if(!validateDob()) {
313
			return false;
314
		}
315
 
316
		$('#thanks').fadeIn(1000);
317
		$('#insuranceDetailDiv h3').fadeOut(100);
318
		$('#insuranceDetailsForm').slideUp(100);
319
		jQuery.ajax({
320
			type: "POST",
321
			url: "/shipping!storeInsuranceDetails?addressId=" + $('#addressid').val(),
322
			data: $('#insuranceDetailsForm').serialize(),
323
			success: function(msg){
324
				window.setTimeout(function() {$('#insuranceDetailDiv').slideUp(100);}, 2000);
325
			},
326
			error: function(response) {
327
				//We dont want to bother user too much with these details.We can ignore this in case of rare failures.
328
				window.setTimeout(function() {$('#insuranceDetailDiv').slideUp(100);}, 2000);
329
			}
330
		});
331
	});
332
 
4453 varun.gupt 333
	$('#poplogin').click(function(){
4222 varun.gupt 334
		$.colorbox({
335
    		width: "860px",
4458 varun.gupt 336
    		height: "340px",
4222 varun.gupt 337
    		iframe: false,
338
    		href: "/login-mini",
339
 
340
    		onComplete: function(){
4372 varun.gupt 341
    			trackEventWithGA('Cart', 'Login/Register Popup', '');
4222 varun.gupt 342
    		}
343
    	});
344
	});
345
 
3830 chandransh 346
	$('#proceedToPay').click(function(){
6921 anupam.sin 347
		if($('#insuranceDetailsForm:visible').length == 1) {
6971 anupam.sin 348
			showInsuranceError("Please submit the insurance details first");
6912 anupam.sin 349
			return false;
350
		}
351
 
5748 anupam.sin 352
		if(($('#store-addresses').find('.default-address').attr('zone') !=  $('#zone-selector').val()) && ($("#tabSelector").val() == "HotSpot")) {
5747 anupam.sin 353
			alert("Please select one store address");
354
			return false;
355
		}
4222 varun.gupt 356
		var canProceedToPay = parseInt($('#canProceedToPay').val());
3830 chandransh 357
 
358
		if (canProceedToPay == 1)	{
359
 
360
			trackProceedToPay();
361
			$('#formProceedToPay').submit();
362
		} else	{
5040 varun.gupt 363
			var reasonActionDisability = $('#reasonActionDisability').val();
3830 chandransh 364
 
5040 varun.gupt 365
			if(reasonActionDisability.indexOf('Location not serviceable') >= 0)	{
366
				trackEventWithGA('Cart', 'Location not serviceable', $('#selectedPincode').val());
367
			}
5831 anupam.sin 368
			else if (($("#tabSelector").val() == "HotSpot")) {
369
				reasonActionDisability = 'Please enter an address which will be printed on the bill';
370
			} else {
371
				reasonActionDisability = 'Please specify a delivery address';
372
			}
5040 varun.gupt 373
			alert(reasonActionDisability);
3830 chandransh 374
		}
375
	});
4791 varun.gupt 376
 
377
	$('#viewOrders').click(function(){
378
		window.location.href = "/myaccount";
379
	});
1190 varun.gupt 380
 
3830 chandransh 381
	$('#cart .remove-quantitybttn').click(function(){
382
		var itemId = $(this).attr('id').split('_')[1];
383
		window.location.href = "/cart/"  + itemId + "?_method=delete" + "&productid=" + itemId;
1463 varun.gupt 384
	});
1981 varun.gupt 385
 
3830 chandransh 386
	$('#computeEstimate').click(function(){
387
		changeEstimate();
3941 varun.gupt 388
		$('#cartDetail').find('thead .dev-pincode').html($('#zipcode').val());
3830 chandransh 389
	});
390
 
1981 varun.gupt 391
	$('#applyCoupon').click(function(){
392
		$('#couponAction').val('applycoupon');
393
		$('#frmCouponCode').submit();
394
	});
395
 
396
	$('#removeCoupon').click(function(){
397
		$('#couponAction').val('removecoupon');
398
		$('#frmCouponCode').submit();
399
	});
3830 chandransh 400
 
401
	$('.cart-item-quantity').change(function(){
402
		var itemId = $(this).attr("id").split('_')[1];
403
		var quantity = parseInt($(this).val());
404
 
405
		if (quantity > 5)	{
406
			alert("You can not order more than 5 pieces of same product.");
407
			$(obj).focus();
408
		}
409
		else	{
9721 amit.gupta 410
				$.post("/cart/" + itemId + "?_method=put&productid=" + itemId + "&quantity=" + quantity);
411
 
3830 chandransh 412
		}
413
	});
414
 
415
	$('#submitAddress').click(function(){
6912 anupam.sin 416
		if($('#guardianName').length > 0 && $('#guardianName').val() === '') {
6971 anupam.sin 417
			showInsuranceError('Please enter the name of your Father/Husband');
6912 anupam.sin 418
			return false;
419
		}
420
		if($('#dob').length > 0 && ($('#dob').val() === '' || $('#dob').val() === 'Example: 18/08/1986')) {
6971 anupam.sin 421
			showInsuranceError('Please enter your date of birth');
6912 anupam.sin 422
			return false;
423
		}
424
 
425
		if($('#dob').length > 0) {
426
			if(!validateDob()) {
427
				return false;
428
			}
429
		}
430
 
431
 
3830 chandransh 432
		$('#frmShippingAddress').submit();
433
	});
434
 
4325 mandeep.dh 435
	$('#addAddress').live('click', function(){
3830 chandransh 436
		showAddAddressForm();
437
	});
4325 mandeep.dh 438
 
439
	$('#closeAddAddressForm').live('click', function() {
3830 chandransh 440
		showAddressList();
441
	});
442
 
443
	$('#addresses .button-address-select').click(function(){
444
		var addressId = $(this).attr('id').split('_')[1];
445
		$('#formChangeAddressTo_' + addressId).submit();
446
	});
447
 
5716 anupam.sin 448
	function checkIfUserHasAddress(){
3830 chandransh 449
		var addressEmpty = parseInt($('#addressEmpty').val());
450
 
451
		if (addressEmpty == 1)	{
452
			showAddAddressForm();
453
		}
1460 varun.gupt 454
	}
3830 chandransh 455
 
456
	function showAddAddressForm(){
5716 anupam.sin 457
		//$('#main-right-container').hide();
458
		$('#shipping-address-div').hide();
459
		$('#billing-address-div').hide();
3830 chandransh 460
		$('#frmShippingAddress').show();
461
	}
462
 
463
	function showAddressList()	{
464
		$('#frmShippingAddress').hide();
5716 anupam.sin 465
		//$('#main-right-container').show();
5831 anupam.sin 466
		if($("#tabSelector").val() == "HotSpot") {
467
			$('#billing-address-div').show();
468
		} else {
469
			$('#shipping-address-div').show();
470
		}
3830 chandransh 471
	}
472
});
794 rajveer 473
 
1463 varun.gupt 474
function sumOfColumns(tableID, columnIndex, hasHeader)	{
475
	var tot = 0;
476
	var inc = 1;
477
	var tableElement = $("#" + tableID + " tr" + (hasHeader ? ":gt(0)" : ""));
478
	var tableChildren = tableElement.children("td:nth-child(" + columnIndex + ")");
479
 
480
	tableChildren.each(function() {
481
		var currentVal = document.getElementById('totalPrice' + inc).innerHTML;
482
		inc ++;
483
		var splitVal = currentVal.split("Rs.");
484
		var num = parseFloat(splitVal[1].replace(/[^\d\.-]/g,''));
485
		tot += parseFloat(num);
486
	});
487
	totalAmount = tot;
488
	var formated_value = $().number_format(tot, {
489
		numberOfDecimals:2,
490
		decimalSeparator: '.',
491
		thousandSeparator: ',',
492
		symbol: 'Rs.'
493
	});
494
	return formated_value;
794 rajveer 495
}
496
 
497
function subtractionOfColumns(tableID, columnIndex, hasHeader) {
1463 varun.gupt 498
	var tot = 0;
499
 
500
	$("#" + tableID + " tr" + (hasHeader ? ":gt(0)" : "")).children("td:nth-child(" + columnIndex + ")").each(function(){
501
		var currentVal=$(this).html();
502
		var splitVal=currentVal.split("Rs.");
503
		var num = parseFloat(splitVal[1].replace(/[^\d\.-]/g,''));
504
		tot += parseInt(num);
505
	});
506
 
507
	var formated_value = $().number_format(tot, {
508
		numberOfDecimals: 2,
509
		decimalSeparator: '.',
510
		thousandSeparator: ',',
511
		symbol: 'Rs.'
512
	});
513
	return formated_value;
794 rajveer 514
}
515
 
1463 varun.gupt 516
function changeEstimate(item_id)	{
517
	if(item_id == null )	{
3830 chandransh 518
		$("#cartDetail tbody tr").each(function(index, item){
519
			var itemId = $(item).attr("id");
9714 amit.gupta 520
			if(itemId.length != "0") changeEstimate(itemId);
3830 chandransh 521
		});
522
 
1463 varun.gupt 523
	} else	{
524
		jQuery.ajax({
525
			type: "GET",
526
			url: "/estimate/" + $("#zipcode").val() + "_" + item_id,
527
			beforeSend: function(){
7893 rajveer 528
				$("#img" + "_" + item_id).html("<img src='/images/loader_l.gif'>").show();
6561 amit.gupta 529
				$("#block" + "_" + item_id).hide();
530
				$("#serv_" + item_id).hide();
1463 varun.gupt 531
			},
3830 chandransh 532
			success: function(data){
7893 rajveer 533
				$("#img" + "_" + item_id).html("<img src='/images/loader_l.gif'>").hide();
3830 chandransh 534
				var response = eval('(' + data + ')');
7795 rajveer 535
				var deliveryEstimate = response['delivery_estimate'];
6561 amit.gupta 536
				var otg= response['on_time_guarantee'];
7872 rajveer 537
				var codDeliveryEstimate = response['cod_delivery_estimate'];
7849 rajveer 538
				var isCODAvailableForLocation = (response['is_cod_available_for_location'] === 'true');
3830 chandransh 539
 
540
				if(deliveryEstimate == -1)	{
6561 amit.gupta 541
					$("#serv_" + item_id).show();
542
					return;
7791 rajveer 543
				} else	{
544
					$("#days_" + item_id).html(deliveryEstimate);
7878 rajveer 545
					$("#show_cod_" + item_id).hide();
7877 rajveer 546
					if(isCODAvailableForLocation && (deliveryEstimate != codDeliveryEstimate)){
7872 rajveer 547
						$("#coddays_" + item_id).html(codDeliveryEstimate);
7878 rajveer 548
						$("#show_cod_" + item_id).show();	
7872 rajveer 549
					}	
3830 chandransh 550
				}
6561 amit.gupta 551
				if(otg == "true")	{
552
					$("#otg_" + item_id).show();
553
				} else {
554
					$("#otg_" + item_id).hide();
555
				}
556
				$("#block" + "_" + item_id).show();
1463 varun.gupt 557
			}
558
		});
559
	}
560
}