
function expandingWindow(website) {
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 0;    // distance to left edge of window
var topdist = 0;     // distance to top edge of window
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes,menubar=yes,status=yes,location=yes,toolbar=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}
//-----------------------------------חלונות נפתחים לצ'אט------------------------------------------->
function expandingWindow(website) {
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 0;    // distance to left edge of window
var topdist = 0;     // distance to top edge of window
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes,menubar=yes,status=yes,location=yes,toolbar=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}
//----------------------------------פונקציית--חיפוש במנועי חיפוש--------------------------------->
var FirstForm;
function StartSearch(){
	document.forms[FirstForm+document.InputForm.SearchSelect.selectedIndex].elements[0].value=document.InputForm.SearchWords.value;
	document.forms[FirstForm+document.InputForm.SearchSelect.selectedIndex].submit();
}


//-----------------------צבע--------------------------------------->
function test(form) {
if (form.text.value == "")
alert("What\'s your favorite color?")
else { 
document.bgColor=(""+form.text.value+"");
   }
}


//--------------------------------שינוי צבע הכפתורים------------------->
//פונקצייה לשינוי צבע הכפתורים
function change(color){
var el=event.srcElement
if (el.tagName=="INPUT"&&el.type=="button")
event.srcElement.style.backgroundColor=color
}


//-----------------------------תפריט ניווט מהיר---------------------------------->
function menu_show()
{
if(navigator.appName=="Netscape")
{
	doc="document."
	sty=""
}
if(navigator.appName=="Microsoft Internet Explorer")
{
	doc="document.all."
	sty=".style"
}
 x=eval(doc+'mooki'+sty)
 
	
	
		x.visibility='visible'
		formi.but.value="הקש/י למעבר"
		

	
}


function menu_close()
{
	if(navigator.appName=="Netscape")
	{
	doc="document."
	sty=""
	}
if(navigator.appName=="Microsoft Internet Explorer")
	{
	doc="document.all."
	sty=".style"
	}
 x=eval(doc+'mooki'+sty)
	if(document.formi.but.value=="הקש/י למעבר")
	{
	x.visibility='hidden'
	formi.but.value="ניווט מהיר באתר"
	}			
}

//צבע רקע מתחלף במעבר עכבר---------------------------------------------------------->


function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}


//---------תיבת חיפוש בתוך הדף לפי מחרוזות-----------------------
var NS4 = (document.layers);
var IE4 = (document.all);

var win = this;
var n   = 0;

function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
if (NS4) {
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;
if (n == 0) alert( " לא מופיעים ברשימת האתרים" + str + " המשפט (או המילה) שרשמת ");
}
if (IE4) {
txt = win.document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
else {
if (n > 0) {
n = 0;
findInPage(str);
}
else
alert(str + " -המילה  לא קיימת  בדף - " + str);
}
}
return false;
}


//----------------------------------------------------

function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
   }
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}

//  -------------------בדיקת הנתונים באתרים של הגולשים------------

function submitit()
{
	var url = document.theform.url.value
	var linkName = document.theform.linkName.value
	if (url=="")
	{
		alert("שכחת לכתוב את כתובת הקישור-אנא מלאו שוב את שני השדות")
		document.theform.action='addsite.asp'
		
	}
	else
		if (url=="http://")
	{
		
		alert("שכחת לכתוב את כתובת הקישור-אנא מלאו שוב את שני השדות")
		document.theform.action='addsite.asp'
	}
	else
		if (linkName=="")
	{
		alert("השדה עם תיאור הקישורית לא מלא-אנא מלאו שוב את שני השדות")
		document.theform.action='addsite.asp'
	}
}


//----------------------------------בדיקת השדות של עדכונים בטבלת הגולשים----






