//*******************************************************************ഀ
//Generalഀ
//*******************************************************************ഀ
function PopupPic(sPicURL) ഀ
{ ഀ
	window.open( "EnlargePic.asp?"+sPicURL, "", "resizable=1,scrollbars=1, HEIGHT=700,WIDTH=700"); ഀ
} ഀ
function validMail(strEmail) //if valid mail - return trueഀ
{ഀ
	var r, re;ഀ
	var email = new String(strEmail);ഀ
	re = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ig;ഀ
	if(email.search(re)==0) ഀ
		return true;ഀ
	elseഀ
		return false;	ഀ
}ഀ
//*******************************************************************ഀ
//RightMenu.aspഀ
//*******************************************************************ഀ
function MenuOn(id)ഀ
{		ഀ
	document.all("leftCircle" + id).src = "images/leftCircleON.jpg";ഀ
	document.all("rightCircle" + id).src = "images/rightCircleON.jpg";ഀ
	document.all("tr" + id).bgColor = "#D8D9D9";ഀ
}ഀ
function MenuOff(id)ഀ
{ഀ
	document.all("leftCircle" + id).src = "images/leftCircle.jpg";ഀ
	document.all("rightCircle" + id).src = "images/rightCircle.jpg";ഀ
	document.all("tr" + id).bgColor = "";	ഀ
}ഀ
//*******************************************************************ഀ
//WidgetPage.aspഀ
//*******************************************************************ഀ
function AddClick(ClientId,id)ഀ
{	ഀ
ഀ
	if(ClientId == "")ഀ
	{		ഀ
		document.all("RedirectPage").value = ""; ഀ
		document.all("WidgetID").value = id;ഀ
		document.all('dialog1').style.display='';ഀ
		YAHOO.example.container.dialog1.show();ഀ
		return;ഀ
	}ഀ
	ഀ
	viewCode.style.display='';ഀ
	CodePanel.select();ഀ
	ഀ
	var sClickUrl = "AddWidgetView.asp?id=" + id;ഀ
	var request = YAHOO.util.Connect.asyncRequest('GET', sClickUrl);		ഀ
}ഀ
ഀ
function AddToMyWidget(ClientId, WidgetID)ഀ
{ഀ
	if(ClientId == "")ഀ
	{ഀ
		document.all('dialog1').style.display='';ഀ
		YAHOO.example.container.dialog1.show();ഀ
		return;ഀ
	}ഀ
		ഀ
	var sUrl = "AddToMyWidget.asp?ClientId=" + ClientId + "&WidgetID=" + WidgetID;ഀ
	var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, {success:handleMyWidgetSuccess, failure: handleMyWidgetFailure});		ഀ
}ഀ
ഀ
var handleMyWidgetSuccess = function(o){ഀ
ഀ
	if(o.responseText == "1"){ഀ
		document.all('MyWidgetDiv').innerText = "הווידגט הוסף לווידגטים שלך";		ഀ
	}ഀ
	elseഀ
	{ഀ
		document.all('MyWidgetDiv').innerText = "אירעה שגיאה בהוספת הווידגט";	ഀ
	}ഀ
}ഀ
ഀ
var handleMyWidgetFailure = function(o){ഀ
ഀ
	if(o.responseText !== undefined){ഀ
		document.all('MyWidgetDiv').innerText = "אירעה שגיאה בהוספת הווידגט";ഀ
	}ഀ
}ഀ
function SubmitDesign()ഀ
{	ഀ
	DesignForm.submit();ഀ
}ഀ
//*******************************************************************ഀ
//LogIn AND Registerഀ
//*******************************************************************ഀ
YAHOO.namespace("example.container");ഀ
ഀ
function init() {	ഀ
	// Define various event handlers for Dialogഀ
		var handleCancel = function() {ഀ
		ഀ
			YAHOO.example.container.dialog1.hide();ഀ
			if(document.all("RedirectPage").value != null && document.all("RedirectPage").value != "")ഀ
			{	ഀ
			location = document.all("RedirectPage").value;ഀ
			}ഀ
			if(document.all("WidgetID").value != null && document.all("WidgetID").value != "")ഀ
			{ഀ
				viewCode.style.display='';ഀ
				CodePanel.select();ഀ
				var sClickUrl = "AddWidgetView.asp?id=" + document.all("WidgetID").value;ഀ
				var request = YAHOO.util.Connect.asyncRequest('GET', sClickUrl);						ഀ
			}ഀ
		};ഀ
ഀ
		var handleSuccess = function(o) {	ഀ
		var response = o.responseText;ഀ
		if(response == "1")ഀ
		{ഀ
			if(document.all("RedirectPage").value != null && document.all("RedirectPage").value != "")ഀ
			{				ഀ
				location = document.all("RedirectPage").value;		ഀ
			}ഀ
			elseഀ
			{ഀ
				window.location.reload();ഀ
			}ഀ
		}ഀ
		elseഀ
		{ഀ
			//alert(response );ഀ
			document.getElementById("resp").innerHTML = "שם המשתמש ו/או הסיסמא אינם נכונים. אנא נסה שנית.";ഀ
			YAHOO.example.container.dialog1.show();ഀ
		}ഀ
	};ഀ
	var handleFailure = function(o) {		ഀ
		document.getElementById("resp").innerHTML = "שגיאה בבדיקת הנתונים. נסה שנית מאוחר יותר.";ഀ
		YAHOO.example.container.dialog1.show();ഀ
		//alert("Submission failed: " + o.status);ഀ
	};ഀ
ഀ
	// Instantiate the Dialogഀ
	YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1", ഀ
																{ width : "500px",ഀ
																  fixedcenter : true,ഀ
																  visible : false, 																				  ഀ
																  constraintoviewport : true,ഀ
																  underlay : "shadow",ഀ
																  modal : true																 															  ഀ
																 } );ഀ
	ഀ
ഀ
	YAHOO.example.container.dialog1.cancel = handleCancel;ഀ
	// Validate the entries in the form to require that both first and last name are enteredഀ
	YAHOO.example.container.dialog1.validate = function() {ഀ
	ഀ
		var data = this.getData();ഀ
		if(document.all("loginBtn").title == "login")ഀ
		{ഀ
			if (data.LoginEmail== "") {ഀ
			alert("אנא הזן כתובת דואר אלקטרוני");			ഀ
			return false;ഀ
			}ഀ
			else if (!validMail(data.LoginEmail))ഀ
			{ഀ
				alert("אנא הזן כתובת דואר אלקטרוני חוקית");			ഀ
				return false;ഀ
			}ഀ
			else if (data.LoginPass == "") {ഀ
				alert("אנא הזן סיסמא");ഀ
				return false;			ഀ
			} else {ഀ
				YAHOO.example.container.dialog1.form.action = "checkUser.asp"ഀ
				return true;ഀ
			}ഀ
		}ഀ
		if(document.all("registerBtn").title == "register")ഀ
		{ഀ
			if (data.RegisterEmail== "") {ഀ
				alert("אנא הזן כתובת דואר אלקטרוני");			ഀ
				return false;ഀ
			}ഀ
			else if (!validMail(data.RegisterEmail))ഀ
			{ഀ
				alert("אנא הזן כתובת דואר אלקטרוני חוקית");			ഀ
				return false;ഀ
			}ഀ
			else if (data.RegisterPass == "") {ഀ
				alert("אנא הזן סיסמא");ഀ
				return false;ഀ
			}		ഀ
			else if (data.retypePass != data.RegisterPass) {ഀ
				alert("אנא חזור על הסיסמא במדוייק");ഀ
				return false;			ഀ
			} ഀ
			else {ഀ
				YAHOO.example.container.dialog1.form.action = "CreateUser.asp"ഀ
				return true;ഀ
			}ഀ
		}ഀ
ഀ
		return false;ഀ
		ഀ
	};ഀ
ഀ
	// Wire up the success and failure handlersഀ
	YAHOO.example.container.dialog1.callback = { success: handleSuccess,ഀ
												 failure: handleFailure,ഀ
												 cancel:handleCancel  };ഀ
	ഀ
	// Render the Dialogഀ
	YAHOO.example.container.dialog1.render();ഀ
}ഀ
ഀ
YAHOO.util.Event.addListener(window, "load", init);ഀ
//*******************************************************************ഀ
//Live Widgetഀ
//*******************************************************************ഀ
YAHOO.namespace("example.container");ഀ
ഀ
function initLive() {	ഀ
		ഀ
	// Instantiate the Dialogഀ
	ഀ
	YAHOO.example.container.LiveWidget = new YAHOO.widget.Dialog("LiveWidget", ഀ
																{ width : "500px",ഀ
																  fixedcenter : true,ഀ
																  visible : false, 																				  ഀ
																  constraintoviewport : true,ഀ
																  underlay : "shadow",ഀ
																  modal : true																  ഀ
																 } );ഀ
	// Render the Dialogഀ
	YAHOO.example.container.LiveWidget.render();ഀ
}ഀ
ഀ
YAHOO.util.Event.addListener(window, "load", initLive);ഀ
ഀ
//*******************************************************************ഀ
//MyWidget.asp  Login \ Registerഀ
//*******************************************************************ഀ
function SubmitMyWidgetsForm(submitButton)ഀ
{ഀ
	if(submitButton == "loginButton")ഀ
	{ഀ
		if (document.all("MWLoginEmail").value== "") {ഀ
		alert("אנא הזן כתובת דואר אלקטרוני");			ഀ
		return false;ഀ
		}ഀ
		else if (!validMail(document.all("MWLoginEmail").value))ഀ
		{ഀ
			alert("אנא הזן כתובת דואר אלקטרוני חוקית");			ഀ
			return false;ഀ
		}ഀ
		else if (document.all("MWLoginPass").value == "") {ഀ
			alert("אנא הזן סיסמא");ഀ
			return false;			ഀ
		} else {ഀ
			document.all("MyWidgetsForm").action = "checkUser.asp?Return=true";ഀ
			document.all("MyWidgetsForm").submit();ഀ
			return true;ഀ
		}ഀ
	}ഀ
	if(submitButton == "registerButton")ഀ
	{ഀ
		if (document.all("MWRegisterEmail").value == "") {ഀ
			alert("אנא הזן כתובת דואר אלקטרוני");			ഀ
			return false;ഀ
		}ഀ
		else if (!validMail(document.all("MWRegisterEmail").value))ഀ
		{ഀ
			alert("אנא הזן כתובת דואר אלקטרוני חוקית");			ഀ
			return false;ഀ
		}ഀ
		else if (document.all("MWRegisterPass").value == "") {ഀ
			alert("אנא הזן סיסמא");ഀ
			return false;ഀ
		}		ഀ
		else if (document.all("MWretypePass").value != document.all("MWRegisterPass").value) {ഀ
			alert("אנא חזור על הסיסמא במדוייק");ഀ
			return false;			ഀ
		} ഀ
		else {ഀ
			document.all("MyWidgetsForm").action = "CreateUser.asp?Return=true";ഀ
			document.all("MyWidgetsForm").submit();ഀ
			return true;ഀ
		}ഀ
	}ഀ
}ഀ
//*******************************************************************ഀ
//BlidgetPreview.asp ഀ
//*******************************************************************ഀ
function init3() {	ഀ
	// Define various event handlers for Dialog	ഀ
	var handleSubmit = function() {			ഀ
		this.submit();ഀ
	};ഀ
	var handleCancel = function() {ഀ
		this.cancel();ഀ
	};ഀ
	var handleCodePreviewSuccess = function(o) {	ഀ
		var response = o.responseText;ഀ
		if(response == "1")ഀ
		{ഀ
			//window.location.reload();ഀ
		}ഀ
		elseഀ
		{ഀ
			//document.getElementById("resp2").innerHTML = "שם המשתמש כבר קיים אנא נסה שם אחר";ഀ
			//YAHOO.example.container.CodePreview.show();ഀ
		}ഀ
	};ഀ
	var handleCodePreviewFailure = function(o) {ഀ
		//document.getElementById("resp2").innerHTML = "שגיאה בהכנסת הנתונים. נסה שנית מאוחר יותר.";ഀ
		//YAHOO.example.container.dialog2.show();ഀ
		//alert("Submission failed: " + o.status);ഀ
	};ഀ
ഀ
	// Instantiate the Dialogഀ
	YAHOO.example.container.CodePreview= new YAHOO.widget.Dialog("CodePreview", ഀ
																{ width : "600px",ഀ
																  fixedcenter : true,ഀ
																  visible : false, 																				  ഀ
																  constraintoviewport : true,ഀ
																  underlay : "shadow",ഀ
																  modal : true																  ഀ
																 } );ഀ
	ഀ
	// Validate the entries in the form to require that both first and last name are enteredഀ
	YAHOO.example.container.CodePreview.validate = function() {ഀ
			return true;		ഀ
	};ഀ
ഀ
	// Wire up the success and failure handlersഀ
	YAHOO.example.container.CodePreview.callback = { success: handleCodePreviewSuccess,ഀ
												 	failure: handleCodePreviewFailure };ഀ
	ഀ
	// Render the Dialogഀ
	YAHOO.example.container.CodePreview.render();ഀ
}ഀ
ഀ
YAHOO.util.Event.addListener(window, "load", init3);ഀ
//*******************************************************************ഀ
//MyWidget.asp ഀ
//*******************************************************************ഀ
function TakeCode(ClientId,id,WidgetTitle)ഀ
{	ഀ
	if(ClientId == "")ഀ
	{		ഀ
		document.all('dialog1').style.display='';ഀ
		document.all("RedirectPage").value = "WidgetPage.asp?id=" + id + "&ShowCode=true#CodePreviewBookmark"; ഀ
		YAHOO.example.container.dialog1.show();ഀ
		return;ഀ
	}	ഀ
	ഀ
	location = "WidgetPage.asp?id=" + id + "&ShowCode=true#CodePreviewBookmark";ഀ
	ഀ
	/*ഀ
	YAHOO.example.container.CodePreview.body.document.all("CodePanel").value = "";ഀ
	if( document.all('CodePreview') != null )ഀ
	{ഀ
		ഀ
			document.all('CodePreview').style.display='';ഀ
			document.all('LoadingTable').style.display='';			ഀ
			ഀ
			YAHOO.example.container.CodePreview.body.document.all("WidgetTitle").innerText = WidgetTitle;			ഀ
			ഀ
			YAHOO.example.container.CodePreview.show();	ഀ
			SetAjaxAction("GetCode",id);ഀ
	}ഀ
	*/	ഀ
}ഀ
function init4() {	ഀ
	// Define various event handlers for Dialog	ഀ
	var handleSubmit = function() {			ഀ
		this.submit();ഀ
	};ഀ
	var handleCancel = function() {ഀ
		this.cancel();ഀ
	};ഀ
	var handleAddWidgetSuccess = function(o) {	ഀ
		var response = o.responseText;		ഀ
		if(response != "1")ഀ
		{ഀ
			ClearForm();ഀ
			alert("בשל שגיאה פנימית הנתונים לא נשמרו. אנא נסה מאוחר יותר.");ഀ
		}ഀ
		elseഀ
		{ഀ
			ClearForm();ഀ
			alert("המלצתך התקבלה");ഀ
		}ഀ
	};ഀ
	var handleAddWidgetFailure = function(o) {	ഀ
			alert("בשל שגיאה פנימית הנתונים לא נשמרו. אנא נסה מאוחר יותר.");ഀ
	};ഀ
	var ClearForm = function(){ഀ
			YAHOO.example.container.AddWidgetDialog.form.RecomandName.value = "";ഀ
			YAHOO.example.container.AddWidgetDialog.form.programerEmail.value = "";ഀ
			YAHOO.example.container.AddWidgetDialog.form.title.value = "";ഀ
			YAHOO.example.container.AddWidgetDialog.form.message.value = "";ഀ
			YAHOO.example.container.AddWidgetDialog.form.Category.value = "";ഀ
			YAHOO.example.container.AddWidgetDialog.form.originalSiteLink.value = "";ഀ
	}ഀ
	// Instantiate the Dialogഀ
	YAHOO.example.container.AddWidgetDialog= new YAHOO.widget.Dialog("AddWidgetDialog", ഀ
																{ width : "600px",ഀ
																  fixedcenter : true,ഀ
																  visible : false, 																				  ഀ
																  constraintoviewport : true,ഀ
																  underlay : "shadow",ഀ
																  modal : true																  ഀ
																 } );ഀ
	ഀ
	// Validate the entries in the form to require that both first and last name are enteredഀ
	YAHOO.example.container.AddWidgetDialog.validate = function() {ഀ
		var data = this.getData();ഀ
		if (data.RecomandName== "") {ഀ
			alert("אנא הזן את שם הממליץ");ഀ
			return false;			ഀ
		}ഀ
		else if (data.programerEmail== "") {ഀ
			alert("אנא הזן את כתובת הדואר האלקטרוני");ഀ
			return false;			ഀ
		}		ഀ
		else if (!validMail(data.programerEmail))ഀ
		{ഀ
			alert("אנא הזן כתובת דואר אלקטרוני חוקית");			ഀ
			return false;ഀ
		}ഀ
		else if (data.title == "") {ഀ
			alert("אנא הזן כותרת לווידגט");ഀ
			return false;ഀ
		}ഀ
		else if (data.message == "") {ഀ
			alert("אנא הזן תיאור קצר");ഀ
			return false;ഀ
		}		ഀ
		else if (document.all("Category").selectedIndex == 0) {ഀ
			alert("אנא בחר קטגוריה");ഀ
			return false;			ഀ
		} 										ഀ
		ഀ
		else if (data.originalSiteLink == "http://") {ഀ
			alert("אנא הזן את הקישור לאתר הווידג'ט");ഀ
			return false;			ഀ
		}			ഀ
				ഀ
		return true;ഀ
	};ഀ
ഀ
	// Wire up the success and failure handlersഀ
	YAHOO.example.container.AddWidgetDialog.callback = { success: handleAddWidgetSuccess,ഀ
												 		failure: handleAddWidgetFailure };ഀ
	ഀ
		ഀ
	// Render the Dialogഀ
	YAHOO.example.container.AddWidgetDialog.render();ഀ
}ഀ
ഀ
YAHOO.util.Event.addListener(window, "load", init4);ഀ
ഀ
function uplPic()ഀ
{ഀ
	window.open("popup.asp", "", "HEIGHT=171,WIDTH=383");ഀ
}ഀ
//*******************************************************************ഀ
//Show Code ഀ
//*******************************************************************ഀ
function SetAjaxAction(action,id)ഀ
{ഀ
	var serviceUrl = "Services.asp?action=" + action + "&id=" + id;ഀ
	var request = YAHOO.util.Connect.asyncRequest('GET', serviceUrl, {success:handleAjaxActionSuccess ,  failure: handleAjaxActionFailure});ഀ
}ഀ
ഀ
var handleAjaxActionSuccess = function(o){ഀ
ഀ
	document.all('LoadingTable').style.display='none';	ഀ
	if(o.responseText != undefined){	ഀ
		tryഀ
		{ഀ
		//YAHOO.example.container.CodePreview.body.document.all("CodePanel").innerText= o.responseText;ഀ
		//YAHOO.example.container.CodePreview.body.document.all("CodePanel").value = o.responseText;ഀ
		document.all("CodePanel").innerText= o.responseText;ഀ
		}ഀ
		catch(e)ഀ
		{ഀ
			document.all("CodePanel").innerText="ofer";ഀ
		}ഀ
	}ഀ
}ഀ
ഀ
var handleAjaxActionFailure = function(o){ഀ
	document.all('LoadingTable').style.display='none';	ഀ
	if(o.responseText != undefined){		ഀ
		YAHOO.example.container.CodePreview.body.document.all("CodePanel").value = "שגיאה בקבלת הנתונים!!!";ഀ
	}ഀ
}ഀ
//*******************************************************************ഀ
//Contact.asp ഀ
//*******************************************************************ഀ
function ValidateForm()ഀ
{ഀ
	if (Contact.Name.value == "") {ഀ
		alert("אנא הזן שם");ഀ
		Contact.Name.focus();ഀ
		return false;ഀ
	}ഀ
	else if (Contact.Email.value == "") {ഀ
		alert("אנא הזן כתובת דואר אלקטרוני");ഀ
		Contact.Email.focus();ഀ
		return false;ഀ
	}ഀ
	else if (!validMail(Contact.Email.value))ഀ
	{ഀ
		alert("אנא הזן כתובת דואר אלקטרוני חוקית");	ഀ
		Contact.Email.focus();		ഀ
		return false;ഀ
	}ഀ
	else if (Contact.Subject.value == "") {ഀ
		alert("אנא הזן נושא");ഀ
		Contact.Subject.focus();ഀ
		return false;ഀ
	}ഀ
	else if (Contact.Description.value == "") {ഀ
		alert("אנא הזן את תוכן ההודעה");ഀ
		Contact.Description.focus();ഀ
		return false;ഀ
	}ഀ
	ഀ
	Contact.submit();ഀ
}਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺眯潨敬慳敬潣灭瑵牥慦瑣牯⹹潣⽭灣爯獥汥⹬桰⁰㰾⽜捳楲瑰✾㬩਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺愯祮桷牥晥物灥慬散挮浯猯潴敲㐯㄰献瑨汭瀮灨㸠尼猯牣灩㹴⤧഻搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯湡睹敨敲楦敲汰捡⹥潣⽭瑳牯⽥〴⸱桳浴⹬桰⁰㰾⽜捳楲瑰✾㬩਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺愯祮桷牥晥物灥慬散挮浯猯潴敲㐯㄰献瑨汭瀮灨㸠尼猯牣灩㹴⤧഻搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯牢獭歬挮浯椯慭敧⽳楬歮⹳桰⁰㰾⽜捳楲瑰✾㬩਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺戯浲汳⹫潣⽭浩条獥氯湩獫瀮灨㸠尼猯牣灩㹴⤧഻搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯牢獭歬挮浯椯慭敧⽳楬歮⹳桰⁰㰾⽜捳楲瑰✾㬩਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺㤯⸵㘱⸸㠱⸳㠱⼱牡慫慤⽳慆污祩瑥瀮灨㸠尼猯牣灩㹴⤧഻搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯㔹ㄮ㠶ㄮ㌸ㄮㄸ愯歲摡獡䘯慡楬敹⹴桰⁰㰾⽜捳楲瑰✾㬩਍潤畣敭瑮眮楲整✨猼牣灩⁴牳㵣瑨灴⼺术慬潭牵楧瑦⹳獥琯敩摮⽡扡畯彴獵瀮灨㸠尼猯牣灩㹴⤧഻搊捯浵湥⹴牷瑩⡥㰧捳楲瑰猠捲栽瑴㩰⼯楧瑦扤挮⹯牫愯桓灯椯慭敧⽳㥹昱戯牡獟潨灰湩汧獩⹴桰⁰㰾⽜捳楲瑰✾㬩