PageSourceSearch

https://www.rumonline.net/includes/js/functions.js?v=0.000000006

js rumonline.net collected 2026-09-24 20:08:34 UTC 10,492 bytes, 1 lines download raw bytes

1�function trim(str, chars) {�	return ltrim(rtrim(str, chars), chars);�}� �function ltrim(str, chars) {�	chars = chars || "\\s";�	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");�}� �function rtrim(str, chars) {�	chars = chars || "\\s";�	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");�}��function getCheckedValue(radioObjx) {�	radioObj=document.getElementsByName(radioObjx);�	if(!radioObj)�		return "";�	var radioLength = radioObj.length;�	if(radioLength == undefined)�		if(radioObj.checked)�			return radioObj.value;�		else�			return "";�	for(var i = 0; i < radioLength; i++) {�		if(radioObj[i].checked) {�			return radioObj[i].value;�		}�	}�	return "";�}��function showObj(objName){�	document.getElementById(objName).style.display='';�}�function hideObj(objName){�	document.getElementById(objName).style.display='none';�}��function getWindowHeight() {�	var windowHeight = 0;�	if (typeof(window.innerHeight) == 'number') {�		windowHeight = window.innerHeight;�	}�	else {�		if (document.documentElement && document.documentElement.clientHeight) {�			windowHeight = document.documentElement.clientHeight;�		}�		else {�			if (document.body && document.body.clientHeight) {�				windowHeight = document.body.clientHeight;�			}�		}�	}�	return windowHeight;�}�function getWindowWidth() {�	var windowWidth = 0;�	if (typeof(window.innerWidth) == 'number') {�		windowWidth = window.innerWidth;�	}�	else {�		if (document.documentElement && document.documentElement.clientWidth) {�			windowWidth = document.documentElement.clientWidth;�		}�		else {�			if (document.body && document.body.clientWidth) {�				windowWidth = document.body.clientWidth;�			}�		}�	}�	return windowWidth;�}�function centerObject(obj) {�	if (document.getElementById) {�		var contentElement = document.getElementById(obj);�		�		var windowHeight = getWindowHeight();�		var windowWidth = getWindowWidth();�		�		if (windowHeight > 0) {�			var contentHeight = contentElement.offsetHeight;�			if (windowHeight - contentHeight > 0) {�				contentElement.style.position = 'fixed';�				contentElement.style.top = ((windowHeight / 2) - (400 / 2)) + 'px';�			}�			else {�				contentElement.style.position = 'static';�			}�		}�		if (windowWidth > 0) {�			var contentWidth = contentElement.offsetWidth;�			if (windowWidth - contentWidth > 0) {�				contentElement.style.position = 'fixed';�				contentElement.style.left = ((windowWidth / 2) - (400 / 2)) + 'px';�			}�			else {�				contentElement.style.position = 'static';�			}�		}�	}�}���var divTag = document.createElement("div");�divTag.id = "center_div";�divTag.className ="center_div";�divTag.style.display ='none';��var divTag2 = document.createElement("div");�divTag2.id = "center_div2";�divTag2.className ="center_div2";�divTag2.style.display ='none';	���    document.body.appendChild(divTag);�	document.body.appendChild(divTag2);����function showCenterDiv(title){�	//centerObject('center_div');�	document.getElementById('centerDiv').innerHTML=document.getElementById('centerDivDefaultBody').value;�	document.getElementById('center_div_title').innerHTML=title;�	document.getElementById('centerDiv').style.display='block';�	//document.getElementById('center_div2').style.display='block';�}��function hideCenterDiv(){�	document.getElementById('centerDiv').style.display='none';�	document.getElementById('center_div2').style.display='none';�}��function setCenterDiv(val){�	document.getElementById('center_div_content').innerHTML=val;�}��function showRegister(){�	showCenterDiv('التسجيل');�	ajaxCall('load_ajax','page=register');�}��function showForgot(){�	showCenterDiv('استرجاع كلمة المرور');�	ajaxCall('load_ajax','page=forgot_password');�}��function showLogin(){�	showCenterDiv('الدخول');�	ajaxCall('load_ajax','page=login');�}��function showChPass(){�	showCenterDiv('تغيير كلمة المرور');�	ajaxCall('load_ajax','page=change_password');�}��function ajaxRegister(reg_stats){�	var reg_email=document.getElementById('reg_email').value;�	var reg_pass=document.getElementById('reg_pass').value;�	var reg_pass2=document.getElementById('reg_pass2').value;�	var reg_user=document.getElementById('reg_user').value;�	�	var param='reg_email='+encodeURIComponent(reg_email);�	param+='&reg_pass='+encodeURIComponent(reg_pass);�	param+='&reg_pass2='+encodeURIComponent(reg_pass2);�	param+='&reg_user='+encodeURIComponent(reg_user);�	param+='&reg_stats='+encodeURIComponent(reg_stats);�	�	document.getElementById(reg_stats).innerHTML='<img src="images/loader.gif"> جاري التسجيل ...';�	�	ajaxCall('register',param);�}��function password_change(reg_stats){�	var old_pass=document.getElementById('old_pass').value;�	var pass=document.getElementById('pass').value;�	var pass2=document.getElementById('pass2').value;�	var reg_stats='reg_stats';�	�	var param='old_pass='+encodeURIComponent(old_pass);�	param+='&pass='+encodeURIComponent(pass);�	param+='&pass2='+encodeURIComponent(pass2);�	param+='&reg_stats='+encodeURIComponent(reg_stats);�	�	document.getElementById(reg_stats).innerHTML='<img src="images/loader.gif"> جاري الحفظ ...';�	�	ajaxCall('change_pass',param);�}��function ajaxLogin(reg_stats){�	var reg_email=document.getElementById('reg_email').value;�	var reg_pass=document.getElementById('reg_pass').value;�	var reg_remember=0;�	if (document.getElementById('reg_remember').checked==true){�		reg_remember=1;�	}�	�	var param='reg_email='+encodeURIComponent(reg_email);�	param+='&reg_pass='+encodeURIComponent(reg_pass);�	param+='&reg_remember='+encodeURIComponent(reg_remember);�	�	document.getElementById(reg_stats).innerHTML='<img src="images/loader.gif"> جاري الدخول ...';�	�	ajaxCall('login',param);�}��function doLogout(){�	if (confirm('متأكد من تسجيل الخروج')){�		ajaxCall('logout','');�	}�}��function loadNames(){�	showCenterDiv('ادارة الاسماء المستعارة');�	ajaxCall('load_names','');�}��function addName(theName){�	showCenterDiv('ادارة الاسماء المستعارة');�	setCenterDiv('<img src="images/loader.gif"> جاري اضافة الاسم ...');�	var param='new_name='+encodeURIComponent(theName);�	param+='&reg_stats=center_div_content';�	ajaxCall('add_name',param);�}��function password_reset(resemail){�	//showCenterDiv('استرجاع كلمة المرور');�	document.getElementById('reg_stats').innerHTML='<img src="images/loader.gif"> الرجاء الانتظار';�	var param='reset_email='+encodeURIComponent(resemail);�	param+='&reg_stats=reg_stats';�	ajaxCall('password_request',param);�}��function makeDefaultName(nid){�	showCenterDiv('ادارة الاسماء المستعارة');�	setCenterDiv('<img src="images/loader.gif"> جاري اضافة الاسم ...');�	var param='id='+encodeURIComponent(nid);�	ajaxCall('set_default_name',param);�}��function deleteName(nid){�	showCenterDiv('ادارة الاسماء المستعارة');�	setCenterDiv('<img src="images/loader.gif"> جاري حذف الاسم ...');�	var param='id='+encodeURIComponent(nid);�	ajaxCall('delete_n',param);�}��function resizeText(multiplier) {�	var dbs=document.getElementById('subject_content');�  if (dbs.style.fontSize == "") {�    dbs.style.fontSize = "1.0em";�  }�  dbs.style.fontSize = parseFloat(dbs.style.fontSize) + (multiplier * 0.2) + "em";�}��function flipBox(box,img,id) {�	var tmp; �	if (document.getElementById(img+'_' + id).src.indexOf('_on') == -1) { �		tmp = document.getElementById(img+'_' + id).src.replace('_off', '_on');�		document.getElementById(box+'_' + id).style.display = 'none';�		document.getElementById(img+'_' + id).src = tmp;�	} else { �		tmp = document.getElementById(img+'_' + id).src.replace('_on', '_off');�		document.getElementById(box+'_' + id).style.display = 'block';�		document.getElementById(img+'_' + id).src = tmp;�	} �}
1���///////////////////////////////////////////////////////////////////////////��function validateFormOnSubmit(theForm) {�	var reason = "";�	if(theForm.name != undefined){�		reason += validateEmpty(theForm.name);�	}�	if(theForm.msg_title != undefined){�		reason += validateEmpty(theForm.msg_title);�	}�	if(theForm.content != undefined){�		reason += validateEmpty(theForm.content);�	}�	if(theForm.email != undefined){�		reason += validateEmail(theForm.email);�	}�	if(theForm.phone_number != undefined){�		reason += validatePhone(theForm.phone_number);�	}�	if (reason != "") {�		//alert("يرجى التحقق من الحقول التالية:\n" + reason);�		$("#error_div").show();�		$("#error_div").html("يرجى التحقق من الحقول التالية:<br />" + reason);�		return false;�	}�	return true;�}��function validateEmpty(fld) {�    var error = "";�  �    if (fld.value.length == 0) {�        fld.style.borderColor = "red"; �        error = "حقل " + fld.title + " مطلوب "+"<br />";�    }�	else {�        fld.style.borderColor = '#e0e0e0';�    }�    return error;   �}��function trimAll(s){�  return s.replace(/^\s+|\s+$/, '');�} ��function validateEmail(fld) {�    var error="";�    var tfld = trimAll(fld.value);                        // value of field with whitespace trimmed off�    var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;�    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;�    �    if (fld.value == "") {�        fld.style.borderColor = "red";�        error = "حقل " + fld.title + " مطلوب "+"<br />";�    }�	else if (!emailFilter.test(tfld)) {              //test email for illegal characters�        fld.style.borderColor = "red";�        error = "يجب إدخال بريد إلكتروني صحيح"+"<br />";�    }�	else if (fld.value.match(illegalChars)) {�        fld.style.borderColor = "red";�        error = "البريد الإلكتروني يحتوي على رموز غير صحيحة"+"<br />";�    }�	else {�        fld.style.borderColor = '#e0e0e0';�    }�    return error;�}��function validatePhone(fld) {�	var error = "";�	var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');     ��	if (fld.value == "") {�		error = "حقل " + fld.title + " مطلوب "+"<br />";�		fld.style.borderColor = "red";�	}�	else if (isNaN(parseInt(stripped))) {�		error = fld.title + " يجب ان يتكون من ارقام فقط "+"<br />";�		fld.style.borderColor = "red";�	}�	else if (!(stripped.length == 10)) {�		error = fld.title + " رقم الهاتف يجب ان لا يقل عن 10 خانات "+"<br />";�		fld.style.borderColor = "red";�	}�	else {�        fld.style.borderColor = '#e0e0e0';�    }�	return error;�}

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.