PageSourceSearch

https://www.mobilefluid.com/wp-content/plugins/contact-form-maker/js/main_div_front_end_ver-1.7.33.js

js mobilefluid.com collected 2026-10-05 22:46:01 UTC 31,143 bytes, 1,290 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10F=2;
11
12var c;
13
14var a=new Array();
15
16var rated=false;
17
18function set_total_value(form_id)
19{
20var FormCurrency = eval("FormCurrency_" + form_id);
21if(jQuery('.paypal_total'+form_id).length==0)
22	return;
23var div_paypal_show= jQuery('.paypal_total'+form_id);
24var div_paypal_products = jQuery('.paypal_products'+form_id);
25var div_paypal_tax = jQuery('.paypal_tax'+form_id);
26var input_paypal_total = jQuery('.input_paypal_total'+form_id);
27var total=0;
28var total_shipping=0;
29div_paypal_products.html('');
30
31div_paypal_tax.html('');
32
33n=parseInt(jQuery('#counter'+form_id).val());
34	
35jQuery("div[type='type_paypal_checkbox'], div[type='type_paypal_radio']").each(
36	function()
37	{
38		id=jQuery(this).parent().attr('wdid');
39		
40		jQuery(this).find('input:checked').each(
41		
42			function()
43			{
44				label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
45				span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#w
45dform_'+id+"_element_quantity"+form_id).val() : '');
46				total =total + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
47				div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
48			}
49		);
50	}
51); 	
52
53jQuery("div[type='type_paypal_shipping']").each(
54	function()
55	{
56		id=jQuery(this).parent().attr('wdid');
57		
58		jQuery(this).find('input:checked').each(
59		
60			function()
61			{
62				label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
63				span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : '');
64				total_shipping =total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
65				div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
66			}
67		);
68	}
69); 	
70
71jQuery("div[type='type_paypal_select']").each(
72	function()
73	{
74		id=jQuery(this).parent().attr('wdid');
75		if(jQuery(this).find('select').val()!='')
76		{
77			label = jQuery(this).find('select option:selected').html();
78			span_value = FormCurrency + jQuery(this).find('select').val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#w
78dform_'+id+"_element_quantity"+form_id).val() : '');
79			total =total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
80			div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
81		}
82	}
83); 	
84
85jQuery("div[type='type_paypal_price']").each(
86	function()
87	{
88		id=jQuery(this).parent().attr('wdid');
89		if(jQuery('#wdform_'+id+"_element_dollars"+form_id).hasClass('input_active') || jQuery('#wdform_'+id+"_element_cents"+form_id).hasClass('input_active'))
90		{
91			label= jQuery(this).find('.wdform-label').html();
92			cents='00';
93			dollars='0';
94
95			if( jQuery('#wdform_'+id+"_element_dollars"+form_id).hasClass('input_active'))
96				if(jQuery('#wdform_'+id+"_element_dollars"+form_id).val()!='')
97					dollars=jQuery('#wdform_'+id+"_element_dollars"+form_id).val();
98			
99			if( jQuery('#wdform_'+id+"_element_cents"+form_id).hasClass('input_active') && jQuery('#wdform_'+id+"_element_cents"+form_id).val()!='')
100				if(jQuery('#wdform_'+id+"_element_cents"+form_id).val().length==1)
101					cents='0'+jQuery('#wdform_'+id+"_element_cents"+form_id).val();
102				else 
103					cents=jQuery('#wdform_'+id+"_element_cents"+form_id).val();
104					
105			span_value = FormCurrency + dollars+'.'+cents;
106			total =total +  parseFloat(dollars+'.'+cents);
107			div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
108		}
109	}
110); 	
111var FormPaypalTax = eval("FormPaypalTax_" + form_id);
112if(FormPaypalTax != 0)
113	div_paypal_tax.html('Tax: ' + FormCurrency + (((total)*FormPaypalTax) / 100).toFixed(2));	
114								
115jQuery('.div_total'+form_id).html(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2));	
116
117
118input_paypal_total.val(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2))  ;	
119}	
120
121function check_isnum_or_minus(e)
122{
123   	var chCode1 = e.which || e.keyCode;
124	if (chCode1 != 45 )
125	{
126    	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
127        return false;
128	}	
129	return true;
130}
131
132function sum_grading_values(num,form_id){
133
134	var sum = 0;
135	for(var k=0; k<100;k++)
136	{
137		if(document.getElementById(num+'_element'+form_id+'_'+k))
138			if(document.getElementById(num+'_element'+form_id+'_'+k).value)
139			{
140				sum = sum+parseInt(document.getElementById(num+'_element'+form_id+'_'+k).value);
141			}
142			
143        if(document.getElementById(num+'_total_element'+form_id)){
144		if(sum > document.getElementById(num+'_total_element'+form_id).innerHTML){
145		
146		document.getElementById(num+'_text_element'+form_id).innerHTML =" "+ WDF_GRADING_TEXT+" " + document.getElementById(num+'_total_element'+form_id).innerHTML;
147		}
148		else{
149		document.getElementById(num+'_text_element'+form_id).innerHTML="";
150		}
151		}
152	}
153	
154	 if(document.getElementById(num+'_sum_element'+form_id))
155	document.getElementById(num+'_sum_element'+form_id).innerHTML = sum;
156
157}
158
159
160
161
162function change_src(id,el_id,form_id,color){
163	if(rated==false){
164	for(var j=0;j<=id;j++)
165	document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.fmc_plugin_url+"/images/star_"+color+'.png';
166}
167}
168
169
170function reset_src(id,el_id, form_id){
171	if(rated==false){
172	for(var j=0;j<=id;j++)
173	document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.fmc_plugin_url+"/images/star.png";
174	}
175}
176
177function select_star_rating(id,el_id,form_id, color,star_amount)
178{
179	rated=true;
180	for(var j=0;j<=id;j++)
181		document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.fmc_plugin_url+"/images/star_"+color+".png";
182	for(var k=id+1;k<=star_amount-1;k++)
183		document.getElementById(el_id+'_star_'+k+'_'+form_id).src=fm_objectL10n.fmc_plugin_url+"/images/star.png";
184	document.getElementById(el_id+'_selected_star_amount'+form_id).value=id+1;
185}
186
187
188function show_other_input(num, form_id)
189{
190	for(k=0;k<50;k++)
191		if(	document.getElementById(num+"_element"+form_id+k)) 
192			if(	document.getElementById(num+"_element"+form_id+k).getAttribute('other')) 
193				if(	document.getElementById(num+"_element"+form_id+k).getAttribute('other')==1)
194				{
195					element_other=document.getElementById(num+"_element"+form_id+k);
196					break;
197				}
198
199	parent_=element_other.parentNode;
200
201
202
203	var br = document.createElement('br');
204		br.setAttribute("id", num+"_other_br"+form_id);
205
206	var el_other = document.createElement('input');
207		el_other.setAttribute("id", num+"_other_input"+form_id);
208		el_other.setAttribute("name", num+"_other_input"+form_id);
209		el_other.setAttribute("type", "text");
210		el_other.setAttribute("class", "other_input");
211
212	parent_.appendChild(br);
213	parent_.appendChild(el_other);
214
215}
216
217function check_isnum(e)
218{
219  	var chCode1 = e.which || e.keyCode;
220
221    if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39))
222        return true;
223
224	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
225        return false;
226	return true;
227	
228}
229
230function captcha_refresh(id,genid)
231{
232	srcArr=document.getElementById(id+genid).src.split("&r=");
233	document.getElementById(id+genid).src=srcArr[0]+'&r='+Math.floor(Math.random()*100);
234	document.getElementById(id+"_input"+genid).value='';
235	document.getElementById(id+genid).style.display="inline-block";
236}
237
238function set_checked(id,j,form_id)
239{
240	checking=document.getElementById(id+"_element"+form_id+j);
241	if(checking.getAttribute('other'))
242		if(checking.getAttribute('other')==1)
243			if(!checking.checked)
244			{					
245				if(document.getElementById(id+"_other_input"+form_id))
246				{
247					document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_br"+form_id));
248					document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_input"+form_id));
249				}
250				return false;					
251			}
252	return true;
253}
254
255function set_default(id, j, form_id){	
256if(document.getElementById(id+"_other_input"+form_id))
257	{
258		document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_br"+form_id));
259		document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_input"+form_id));
260	}
261}
262
263function add_0(x)
264{
265	if(jQuery(x).val().length==1)
266		jQuery(x).val('0'+jQuery(x).val());
267}
268
269function check_hour(e, id, hour_interval)
270{
271   	var chCode1 = e.which || e.keyCode;
272    	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
273        return false;
274	hour=""+document.getElementById(id).value+String.fromCharCode(chCode1);
275
276	hour=parseFloat(hour);
277	if((hour<0) || (hour>hour_interval))
278        	return false;
279	return true;
280} 
281
282function check_minute(e, id)
283
284{	
285
286		
287
288   	var chCode1 = e.which || e.keyCode;
289
290    	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
291
292        return false;
293
294	minute=""+document.getElementById(id).value+String.fromCharCode(chCode1);
295
296
297
298	minute=parseFloat(minute);
299
300	if((minute<0) || (minute>59))
301
302        	return false;
303
304	return true;
305
306} 
307
308
309
310function check_second(e, id)
311
312{	
313
314		
315
316   	var chCode1 = e.which || e.keyCode;
317
318    	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
319
320        return false;
321
322	second=""+document.getElementById(id).value+String.fromCharCode(chCode1);
323
324
325
326	second=parseFloat(second);
327
328	if((second<0) || (second>59))
329
330        	return false;
331
332	return true;
333
334} 
335
336
337
338function check_isnum_interval(e, x, from, to) {
339  var chCode1 = e.which || e.keyCode;
340  if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) {
341    return true;
342  }
343  if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
344    return false;
345  }
346	val1=""+jQuery(x).val()+String.fromCharCode(chCode1);
347	if (val1.length>2)
348    return false;
349	if (val1=='00')
350    return false;
351	if ((val1<from) || (val1>to))
352    return false;
353	return true;
354}
355
356function change_year(x)
357{
358	year=jQuery(x).val();
359	from=parseFloat(jQuery(x).attr('from'));
360	to=parseFloat(jQuery(x).attr('to'));
361	year=parseFloat(year);
362	if((year>=from) && (year<=to))
363		jQuery(x).val(year);
364	else
365		jQuery(x).val('');
366}
367
368function check_day(e, x)
369{	
370   	var chCode1 = e.which || e.keyCode;
371    if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
372        return false;
373
374	day=""+jQuery(x).val()+String.fromCharCode(chCode1);
375	if(day.length>2)
376        	return false;
377	if(day=='00')
378        	return false;
379	day=parseFloat(day);
380	if((day<0) || (day>31))
381        	return false;
382	return true;
383} 
384
385function check_month(e, x)
386{	
387   	var chCode1 = e.which || e.keyCode;
388   	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
389        return false;
390
391	month=""+jQuery(x).val()+String.fromCharCode(chCode1);
392	if(month.length>2)
393        	return false;
394	if(month=='00')
395        	return false;
396	month=parseFloat(month);
397	if((month<0) || (month>12))
398        	return false;
399	return true;
400} 
401
402
403
404function check_year1(e, x)
405{	
406   	var chCode1 = e.which || e.keyCode;
407   	if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
408        return false;
409
410	year=""+jQuery(x).val()+String.fromCharCode(chCode1);
411	to=parseFloat(jQuery(x).attr('to'));
412	year=parseFloat(year);
413	if(year>to)
414        	return false;
415	return true;
416} 
417
418function delete_value(x)
419{
420	ofontStyle=jQuery(x).attr('class');
421	if(ofontStyle.indexOf("input_deactive")!=-1)
422	{
423		jQuery(x).val("").removeClass("input_deactive").addClass("input_active");
424	}
425}
426
427function return_value(x)
428{
429	if(jQuery(x).val()=="")
430	{
431		jQuery(x).val(jQuery(x).attr('title')).removeClass("input_active").addClass("input_deactive");
432	}
433}
434
435function destroyChildren(node)
436
437{
438  while (node.firstChild)
439      node.removeChild(node.firstChild);
440}
441
442function generate_page_nav(id, form_id, form_view_count, form_view_max)
443
444{
445
446form_view=id;
447
448page_nav=document.getElementById(form_id+'page_nav'+id);
449
450destroyChildren(page_nav);
451
452form_view_elemet=document.getElementById(form_id+'form_view'+id);
453
454remove_whitespace(form_view_elemet.parentNode.parentNode);
455
456display_none_form_views_all(form_id);
457
458
459
460generate_page_bar(id, form_id, form_view_count, form_view_max);
461
462
463
464form_view_elemet.parentNode.style.display="";
465
466		var td = document.createElement("div");
467			td.setAttribute("valign", "middle");
468			td.setAttribute("align", "left");
469			td.style.display="table-cell";
470			td.style.width="40%";
471		
472
473		page_nav.appendChild(td);
474
475
476if(form_view_elemet.parentNode.previousSibling && form_view_elemet.parentNode.previousSibling.previousSibling)
477
478{
479
480	if(form_view_elemet.parentNode.previousSibling.tagName=="DIV") {
481
482		table=form_view_elemet.parentNode.previousSibling;
483    
484  }
485
486	else
487
488		if(form_view_elemet.parentNode.previousSibling.previousSibling.tagName=="DIV") {
489
490			table=form_view_elemet.parentNode.previousSibling.previousSibling;
491      
492    }
493
494		else
495
496			table="none";
497
498	if(table!="none")
499
500	{
501
502		if(!table.firstChild.tagName)
503
504			table.removeChild(table.firstChild);
505
506
507
508
509
510		previous_title	= form_view_elemet.getAttribute('previous_title');
511
512		previous_type	= form_view_elemet.getAttribute('previous_type');
513		if(previous_type=="text")
514			td.setAttribute("class", "previous-page");
515
516		previous_class	= form_view_elemet.getAttribute('previous_class');
517
518		previous_checkable	= form_view_elemet.getAttribute('previous_checkable');
519
520	
521
522		next_or_previous="previous";
523
524
525
526		previous=make_pagebreak_button(next_or_previous, previous_title, previous_type, previous_class, previous_checkable, id, form_id, form_view_count, form_view_max);
527
528		
529
530		td.appendChild(previous);
531
532
533	}
534
535}
536
537
538
539
540
541		var td = document.createElement("div");
542			td.setAttribute("id", form_id+"page_numbers"+form_view);
543			td.setAttribute("valign", "middle");
544			td.setAttribute("class", "page-numbers");
545			td.setAttribute("align", "center");
546			td.style.display="table-cell";
547
548			
549
550if(document.getElementById(form_id+'pages').getAttribute('show_numbers')=="true")
551
552{
553
554		k=0;
555
556		for(j=1; j<=form_view_max; j++)
557
558		{
559
560			if(document.getElementById(form_id+'form_view'+j))
561
562			{
563
564				k++;		
565
566				if(j==form_view)
567
568					page_number=k;
569
570			}
571
572		}
573
574		
575
576		var cur = document.createElement('span');
577
578			cur.setAttribute("class", "page_numbers");
579
580			cur.innerHTML=page_number+'/'+k;
581
582		
583
584		td.appendChild(cur);
585
586
587
588}
589
590		page_nav.appendChild(td);
591
592
593
594			var td = document.createElement("div");
595				td.setAttribute("valign", "middle");
596				td.setAttribute("align", "right");
597				td.style.cssText = "display:table-cell; width:40%; text-align:right;";
598		
599				page_nav.appendChild(td);
600
601not_next=false;
602
603
604if(form_view_elemet.parentNode.nextSibling)
605
606{
607
608	
609	if(form_view_elemet.parentNode.nextSibling.tagName=="DIV" && form_view_elemet.parentNode.nextSibling.className=="wdform-page-and-images")
610
611		table=form_view_elemet.parentNode.nextSibling;
612
613	else
614
615		if(form_view_elemet.parentNode.nextSibling.nextSibling)
616
617		{
618
619			if(form_view_elemet.parentNode.nextSibling.nextSibling.tagName=="DIV")
620
621				table=form_view_elemet.parentNode.nextSibling.nextSibling;
622
623			else
624
625				table="none";
626
627		}
628
629			else
630
631				table="none";
632
633			
634
635	if(table!="none")
636
637	{
638
639		next_title		=form_view_elemet.getAttribute('next_title');
640
641		next_type		=form_view_elemet.getAttribute('next_type');
642		if(next_type=="text")
643				td.setAttribute("class", "next-page");
644
645		next_class		=form_view_elemet.getAttribute('next_class');
646
647		next_checkable	=form_view_elemet.getAttribute('next_checkable');
648
649	
650
651		next_or_previous="next";
652
653	
654
655		next=make_pagebreak_button(next_or_previous, next_title, next_type, next_class, next_checkable, id, form_id, form_view_count, form_view_max);
656
657		
658
659		td.appendChild(next);
660
661
662	}
663
664	else
665
666	{
667
668		not_next=true;
669
670	}
671
672}
673
674else
675
676{
677
678	not_next=true;
679
680}
681
682
683jQuery("#form" + form_id + " div[type='type_map']").each(
684	function()
685	{
686		id=jQuery(this).parent().attr('wdid');
687		if_gmap_init('wdform_'+id, form_id);
688		for(q=0; q<20; q++)
689			if(jQuery("#wdform_"+id+"_element"+form_id)[0].getAttribute("long"+q))
690			{
691				w_long=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("long"+q));
692				w_lat=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("lat"+q));
693				w_info=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("info"+q));
694				add_marker_on_map('wdform_'+id, q, w_long, w_lat, w_info, form_id,false);
695		}
696
697	}
698); 
699
700jQuery("#form" + form_id + " div[type='type_mark_map']").each(
701	function()
702	{
703		id=jQuery(this).parent().attr('wdid');
704		if_gmap_init('wdform_'+id, form_id);
705		q=0;
706			if(jQuery("#wdform_"+id+"_element"+form_id)[0].getAttribute("long"+q))
707			{
708				w_long=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("long"+q));
709				w_lat=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("lat"+q));
710				w_info=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("info"+q));
711				add_marker_on_map('wdform_'+id, q, w_long, w_lat, w_info, form_id,true);
712			}
713
714	}
715); 
716  jQuery('.wdform-element-section').each(function() {
717		if(!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width())!=0)
718		{
719	
720			if(jQuery(this).css('display')=="table-cell")
721			{
722				if(jQuery(this).parent().attr('type')!="type_captcha")
723					jQuery(this).parent().css('width', parseInt(jQuery(this).width()) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
724				else
725					jQuery(this).parent().css('width', (parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)*2+50) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15);
726			}
727		}
728		
729	});
730
731
732}
733
734function display_none_form_views_all(form_id)
735
736{
737
738	for(t=1; t<30; t++)
739
740		if(document.getElementById(form_id+'form_view'+t))
741
742			document.getElementById(form_id+'form_view'+t).parentNode.style.display="none";
743
744}
745
746function generate_page_bar(form_view, form_id, form_view_count, form_view_max)	
747
748{	
749
750		if(document.getElementById(form_id+'pages').getAttribute('type')=='steps')
751
752				make_page_steps_front(form_view, form_id, form_view_count, form_view_max);
753
754		else
755
756			if(document.getElementById(form_id+'pages').getAttribute('type')=='percentage')
757
758				make_page_percentage_front(form_view, form_id, form_view_count, form_view_max);
759
760			else
761
762				make_page_none_front(form_id);
763
764		
765
766
767
768		
769
770		
771
772		if(document.getElementById(form_id+'pages').getAttribute('type')=='show_numbers')		
773
774		{		
775
776			td = document.getElementById(form_id+'page_numbers'+form_view);
777
778			if(td)	
779
780			{	
781
782				destroyChildren(td);
783
784				k=0;
785
786				for(j=1; j<=form_view_max; j++)
787
788				{
789
790					if(document.getElementById(form_id+'form_view'+j))
791
792					{
793
794						k++;		
795
796						if(j==form_view)
797
798							page_number=k;
799
800					}
801
802				}
803
804				
805
806				var cur = document.createElement('span');
807
808					cur.setAttribute("class", "page_numbers");
809
810					cur.innerHTML=page_number+'/'+k;
811
812				
813
814				td.appendChild(cur);
815
816				}
817
818		}
819
820		else
821
822		{	
823
824			td = document.getElementById(form_id+'page_numbers'+form_view);
825
826			if(td)	
827
828			{	
829
830				destroyChildren(document.getElementById(form_id+'page_numbers'+form_view));
831
832			}
833
834		}		
835
836	}
837
838function make_page_steps_front(form_view, form_id, form_view_count, form_view_max)
839
840{
841
842	destroyChildren(document.getElementById(form_id+'pages'));
843
844	show_title			=(document.getElementById(form_id+'pages').getAttribute('show_title')=='true');
845
846	next_checkable		=(document.getElementById(form_id+'form_view'+form_view).getAttribute('next_checkable')=='true');
847
848	previous_checkable	=(document.getElementById(form_id+'form_view'+form_view).getAttribute('previous_checkable')=='true');
849
850	
851
852	k=0;
853
854	for(j=1; j<=form_view_max; j++)
855
856	{	
857
858		if(document.getElementById(form_id+'form_view'+j))
859
860			{
861
862			if(document.getElementById(form_id+'form_view'+j).getAttribute('page_title'))
863
864				w_pages=document.getElementById(form_id+'form_view'+j).getAttribute('page_title');
865
866			else
867
868				w_pages="";
869
870			k++;
871
872			
873
874			page_number = document.createElement('span');
875
876			page_number.setAttribute('id','page_'+j);
877
878			if(j<form_view)
879
880				if(previous_checkable)
881
882					page_number.setAttribute('onClick','if(check'+form_id+'('+form_view+')) generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")');
883
884				else
885
886					page_number.setAttribute('onClick','generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")');
887
888				
889
890				
891
892			if(j>form_view)
893
894				if(next_checkable)
895
896					page_number.setAttribute('onClick','if(check'+form_id+'('+form_view+')) generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")');
897
898				else			
899
900					page_number.setAttribute('onClick','generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")');
901
902			
903
904			
905
906			if(j==form_view)
907
908				page_number.setAttribute('class',"page_active");
909
910			else
911
912				page_number.setAttribute('class',"page_deactive");
913
914			if(show_title)
915
916			{
917
918				page_number.innerHTML=w_pages;
919
920			}
921
922			else
923
924				page_number.innerHTML=k;
925
926			
927
928			document.getElementById(form_id+'pages').appendChild(page_number);
929
930		}
931
932	}
933
934
935
936}
937
938function make_page_percentage_front(form_view, form_id, form_view_count, form_view_max)
939{
940	destroyChildren(document.getElementById(form_id+'pages'));
941	show_title=(document.getElementById(form_id+'pages').getAttribute('show_title')=='true');
942    var div_parent = document.createElement('div');
943       	div_parent.setAttribute("class", "page_percentage_deactive");
944
945    var div = document.createElement('div');
946       	div.setAttribute("id", "div_percentage");
947       	div.setAttribute("class", "page_percentage_active");
948       	div.setAttribute("align", "right");
949		
950    var div_arrow = document.createElement('div');
951       	div_arrow.setAttribute("class", "wdform_percentage_arrow");
952		
953	var b = document.createElement('b');
954       	b.setAttribute("class", "wdform_percentage_text");
955
956	div.appendChild(b);
957	
958	k=0;
959	cur_page_title='';
960	for(j=1; j<=form_view_max; j++)
961	{	
962		if(document.getElementById(form_id+'form_view'+j))
963			{
964			if(document.getElementById(form_id+'form_view'+j).getAttribute('page_title'))
965				w_pages=document.getElementById(form_id+'form_view'+j).getAttribute('page_title');
966			else
967				w_pages="";
968			k++;
969				
970			if(j==form_view)
971			{
972				if(show_title)
973				{ 
974					var cur_page_title = document.createElement('div');
975						cur_page_title.innerHTML=w_pages;
976						
977					cur_page_title.innerHTML=w_pages;										
978					cur_page_title.setAttribute("class", "wdform_percentage_title");
979				}
980				page_number=k;
981
982			}
983		}
984	}
985	b.innerHTML=Math.round(((page_number-1)/k)*100)+'%';
986	div.style.width=((page_number-1)/k)*100+'%';
987	if(page_number==1)
988		div_arrow.style.display='none';
989	div_parent.appendChild(div);
990	div_parent.appendChild(div_arrow);
991	if(cur_page_title)
992		div_parent.appendChild(cur_page_title);
993	document.getElementById(form_id+'pages').appendChild(div_parent);
994}
995
996function make_page_none_front(form_id)
997{
998	destroyChildren(document.getElementById(form_id+'pages'));
999}
1000
1001function make_pagebreak_button(next_or_previous,title,type, class_, checkable, id, form_id, form_view_count, form_view_max)
1002{
1003	switch(type)
1004	{
1005		case 'text': {	
1006
1007			var element = document.createElement('div');
1008
1009				element.setAttribute('id', "page_"+next_or_previous+"_"+id);
1010
1011				element.setAttribute('class', class_);
1012
1013				if(checkable=="true")
1014
1015					element.setAttribute('onClick', "if(check"+form_id+"("+id+")) page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")");
1016
1017				else
1018
1019					element.setAttribute('onClick', "page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")");
1020
1021				element.innerHTML=title;
1022
1023				
1024
1025			return element;
1026
1027			
1028
1029			break;
1030
1031		}
1032
1033		case 'img':{ 			
1034
1035		
1036
1037			var element = document.createElement('img');
1038
1039				element.setAttribute('id', "page_"+next_or_previous+"_"+id);
1040
1041				element.setAttribute('class', class_);
1042
1043				if(checkable=="true")
1044
1045					element.setAttribute('onClick', "if(check"+form_id+"("+id+")) page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")");
1046
1047				else
1048
1049					element.setAttribute('onClick', "page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")");
1050
1051				if(title.indexOf("http")==0)
1052
1053				{
1054
1055					element.src=title;
1056
1057				}
1058
1059				else
1060
1061					element.src=fm_objectL10n.fmc_plugin_url+'/'+title;
1062
1063				
1064
1065			return element;
1066
1067			
1068
1069			break;
1070
1071		}
1072
1073	}
1074
1075}
1076
1077function form_maker_findPos(obj) {
1078  var curtop = 0;
1079  if (obj.offsetParent) {
1080    do {
1081        curtop += obj.offsetTop;
1082    } while (obj = obj.offsetParent);
1083  return [curtop];
1084  }
1085}
1086
1087function page_previous(id, form_id, form_view_count, form_view_max)
1088
1089{
1090
1091	form_view_elemet=document.getElementById(form_id+'form_view'+id);
1092
1093	if(form_view_elemet.parentNode.previousSibling && form_view_elemet.parentNode.previousSibling.previousSibling)
1094
1095	{
1096
1097	if(form_view_elemet.parentNode.previousSibling.tagName=="DIV")
1098
1099		table=form_view_elemet.parentNode.previousSibling;
1100
1101	else
1102
1103		table=form_view_elemet.parentNode.previousSibling.previousSibling;
1104
1105	}
1106
1107	if(!table.firstChild.tagName)
1108
1109		table.removeChild(table.firstChild);
1110
1111
1112
1113	generate_page_nav(table.firstChild.id.replace(form_id+'form_view', ""),form_id, form_view_count, form_view_max);
1114
1115	window.scroll(0, form_maker_findPos(document.getElementById("form" + form_id)));
1116
1117}
1118
1119
1120
1121function page_next(id, form_id, form_view_count, form_view_max)
1122
1123{
1124
1125	form_view_elemet=document.getElementById(form_id+'form_view'+id);
1126
1127	if(form_view_elemet.parentNode.nextSibling)
1128
1129	{
1130
1131	if(form_view_elemet.parentNode.nextSibling.tagName=="DIV")
1132
1133		table=form_view_elemet.parentNode.nextSibling;
1134
1135	else
1136
1137		table=form_view_elemet.parentNode.nextSibling.nextSibling;
1138
1139	}
1140
1141	if(!table.firstChild.tagName)
1142
1143		table.removeChild(table.firstChild);
1144
1145
1146
1147	generate_page_nav(table.firstChild.id.replace(form_id+'form_view', ""), form_id, form_view_count, form_view_max);
1148
1149	window.scroll(0, form_maker_findPos(document.getElementById("form" + form_id)));
1150
1151}
1152
1153
1154function getfileextension(filename, exten) 
1155{ 
1156	if( filename.length == 0 ) 
1157	return true; 
1158	var dot = filename.lastIndexOf("."); 
1159	var extension = filename.substr(dot+1,filename.length); 
1160	exten=exten.split(',');
1161	for(var j=0 ; j<exten.length; j++)
1162	{
1163		exten[j]=exten[j].replace(/\./g,'');
1164		exten[j]=exten[j].replace(/ /g,'');
1165		if(extension.toLowerCase()==exten[j].toLowerCase())
1166		return true;
1167	}
1168	return false; 
1169} 
1170
1171function reselect(select, addclass) {
1172    addclass = typeof(addclass) != 'undefined' ? addclass : '';
1173    jQuery(select).wrap('<div class="sel-wrap ' + addclass + '"/>');
1174    var sel_options = '';
1175    var selected_option = false;
1176    jQuery(select).children('option').each(function() {
1177        if(jQuery(this).is(':selected')){
1178            selected_option = jQuery(this).index();
1179        }
1180        sel_options = sel_options + '<div class="sel-option" value="' + jQuery(this).val() + '">' + jQuery(this).html() + '</div>';
1181
1182    });
1183	
1184	w=jQuery(select)[0].style.width;
1185	
1186	if(w=='100%')
1187		w='100%';
1188	else
1189		w=(jQuery(select).width()+32)+'px';
1190
1191	var sel_imul = '<div class="sel-imul" style="width:'+w+'">\
1192                <div class="sel-selected">\
1193                    <div class="selected-text">' + jQuery(select).children('option').eq(selected_option).html() + '</div>\
1194                    <div class="sel-arraw"></div>\
1195                </div>\
1196                <div class="sel-options">' + sel_options + '</div>\
1197            </div>';
1198			
1199	jQuery(select).addClass('no-width');
1200    jQuery(select).before(sel_imul);
1201}
1202
1203jQuery(document).on('change','.wdform-element-section select', function() {
1204
1205
1206var tektext = jQuery(this).children("option:selected").text();
1207jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
1208jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-options').children('.sel-option').removeClass('sel-ed');
1209jQuery(this).addClass('sel-ed');
1210
1211jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-options').each(function() {
1212if (jQuery(this).html() == tektext) {
1213
1214jQuery(this).addClass('sel-ed');
1215}
1216});
1217
1218});
1219
1220jQuery(document).on('click','.sel-imul', function() {
1221
1222    jQuery('.sel-imul').removeClass('act');
1223    jQuery(this).addClass('act');
1224    if (jQuery(this).children('.sel-options').is(':visible')) {
1225        jQuery('.sel-options').hide();
1226    }
1227    else {
1228        jQuery('.sel-options').hide();
1229        jQuery(this).children('.sel-options').show();
1230		jQuery(this).children('.sel-options').css('width',jQuery(this).width());
1231    }
1232});
1233jQuery(document).on('click','.sel-option', function() {
1234
1235    var tektext = jQuery(this).html();
1236    jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext);
1237
1238    jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed');
1239    jQuery(this).addClass('sel-ed');
1240
1241    var tekval = jQuery(this).attr('value');
1242	
1243    tekval = typeof(tekval) != 'undefined' ? tekval : tektext;
1244  jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() {
1245        if (jQuery(this).html() == tektext) {
1246            
1247            jQuery(this).attr('selected', 'select');
1248        }
1249    });
1250	
1251	jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').change();
1252});
1253
1254var selenter = false;
1255jQuery(document).on('mouseenter','.sel-imul', function() {
1256    selenter = true;
1257});
1258jQuery(document).on('mouseleave','.sel-imul', function() {
1259    selenter = false;
1260});
1261
1262jQuery(document).click(function() {
1263    if (!selenter) {
1264        jQuery('.sel-options').hide();
1265        jQuery('.sel-imul').removeClass('act');
1266    }
1267});
1268
1269function remove_whitespace(node)
1270{
1271var ttt;
1272	for (ttt=0; ttt < node.childNodes.length; ttt++)
1273	{
1274        if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test(  node.childNodes[ttt].nodeValue ))
1275		{
1276			
1277			node.removeChild(node.childNodes[ttt]);
1278			 ttt--;
1279		}
1280		else
1281		{
1282			if(node.childNodes[ttt].childNodes.length)
1283				remove_whitespace(node.childNodes[ttt]);
1284		}
1285	}
1286	return
1287}
1288
1289
1290}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.