	function newWindow() {
msgWindow = window.open("http://www.starchefs.com/nosignup.html", "nosignup", "width=370,height=200,top=400,left=470")
}

function openwin()

{
 if(document.cookie == '') {
 window.open("emailform.php", "emailform", "height=300,width=280,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0");
}
}
	function preloadImages() {
document.preload = new Array();

if (document.images) {
for (var i = 0; i < preloadImages.arguments.length; i++) {
document.preload[i] = new Image();
document.preload[i].src = preloadImages.arguments[i];
 }
}
	}

function stripSpaces() {
x = document.form1.login_username.value;
 while (x.substring(0,1) == ' ') x = x.substring(1);
while (x.substring(x.length-1,x.length) == ' ') x = x.substring(0,x.length-1);
document.form1.login_username.value = x
}

function LoadFrontpage() {
 preloadImages ("http://starchefs.com/images/index/spacer.gif",
"http://starchefs.com/images/index/help_01.gif",
"http://starchefs.com/images/index/line.gif",
"http://starchefs.com/images/index/slide.swf",
"http://starchefs.com/images/index/field_jlogin_ON.gif",
"http://starchefs.com/images/index/field_jlogin_OFF.gif",
"http://starchefs.com/images/index/field_comments_ON.gif",
"http://starchefs.com/images/index/field_comments_OFF.gif",
"http://starchefs.com/images/index/field_schools_ON.gif",
"http://starchefs.com/images/index/field_schools_OFF.gif",
"http://starchefs.com/images/index/field_login_ON.gif",
"http://starchefs.com/images/index/field_login_OFF.gif",
"http://starchefs.com/images/index/field_signup_ON.gif",
"http://starchefs.com/images/index/field_signup_OFF.gif",
"http://starchefs.com/images/index/field_pswd_ON.gif",
"http://starchefs.com/images/index/field_pswd_OFF.gif",
"http://starchefs.com/images/index/field_submit_ON.gif",
"http://starchefs.com/images/index/field_submit_OFF.gif",
"http://starchefs.com/images/index/field_find_ON.gif",
"http://starchefs.com/images/index/field_find_OFF.gif",
"http://starchefs.com/images/index/help_findjob_OFF.gif",
"http://starchefs.com/images/index/help_postjob_OFF.gif",
"http://starchefs.com/images/index/help_findjob_ON.gif",
"http://starchefs.com/images/index/help_postjob_ON.gif");

}

var url = new Array();
var alt = new Array();
var imgType =new Array();

url[1] = "http://www.starchefs.com/events/SF_foodservice/2004/html/index.shtml";
alt[1] = "Events On StarChefs";

url[2] = "http://www.starchefs.com/features/caesar_salads/html/index.shtml";
alt[2] = "Features on StarChefs";

url[3] = "http://www.jamesbeard.org/events/gala/2004/auction.shtml";
alt[3] = "James Beard on StarChefs";

url[4] = "http://www.starchefs.com/events/harvest_square/index.shtml";
alt[4] = "On The Town on StarChefs";

url[5] = "http://www.starchefs.com/experts/profit_planners/";
alt[5] = "Ask the Experts on StarChefs";

url[6] = "http://www.starchefs.com/chocolate_lovers/index.shtml";
alt[6] = "For Chocolate Lovers Only On StarChefs";

url[7] = "http://www.starchefs.com/wine/starvintners/html/produttori/produttori.shtml";
alt[7] = "Star Vintner On StarChefs";

url[8] = "http://www.starchefs.com/wine/ask_Sommelier/wine.php";
alt[8] = "Sommelier On StarChefs";

url[9] = "http://www.starchefs.com/features/food/farmers_market_chefs/index.shtml";
alt[9] = "Features On StarChefs";

url[10] = "http://www.starchefs.com/features/star_brewers/html/scaldis.shtml";
alt[10] = "StarBrewers On StarChefs";
























LoadFrontpage()

////////// ________________________________ random center image display


var which=null;

function random() {

var image = new Array();
var field,result;
field = Math.random();
field = field*100;
field = Math.round(field);

field %= 10;
//(Jeff Added For 9 items on homepage)
//field %= 9; 

//if(field =='9')	
	//field=0;
	 //|| field=='8' 
	 //field=='8' || 

image[0] = '<img name="textField" usemap="#Map_01" src="http://starchefs.com/images/index/text_04.gif" width="261" height="240" border="0">';

image[1] = '<img name="textField" usemap="#Map_02" src="http://starchefs.com/images/index/text_03.gif" width="261" height="240" border="0">';

image[2] = '<img name="textField" usemap="#Map_03" src="http://starchefs.com/images/index/text_02.jpg" width="261" height="240" border="0">';

image[3] = '<img name="textField" usemap="#Map_04" src="http://starchefs.com/images/index/text_07.jpg" width="261" height="240" border="0">';

image[4] = '<img name="textField" usemap="#Map_05" src="http://starchefs.com/images/index/text_02.gif" width="261" height="240" border="0">';

image[5] = '<img name="textField" usemap="#Map_06" src="http://starchefs.com/images/index/text_05.jpg" width="261" height="240" border="0">';

image[6] = '<img name="textField" usemap="#Map_07" src="http://starchefs.com/images/index/text_06.jpg" width="261" height="240" border="0">';

image[7] = '<img name="textField" usemap="#Map_08" src="http://starchefs.com/images/index/text_08.jpg" width="261" height="240" border="0">';

image[8] = '<img name="textField" usemap="#Map_09" src="http://starchefs.com/images/index/text_04.jpg" width="261" height="240" border="0">';

image[9] = '<img name="textField" usemap="#Map_010" src="http://starchefs.com/images/index/text_01.jpg" width="261" height="240" border="0">';









	 
















document.write(image[field]);











which = document.images['textField'].src;







	











/////////////////// ________________________ rollout: go back to the previous randomly displayed image.















for(var i=1; i<=10; i++) {







document.write("<map name='Map_0" + i + "'>")



document.write("<area shape='rect' coords='3,3,257,239'")



document.write("href='" + url[i] + "'")



document.write("alt='" + alt[i] + "'>")



document.write("</map>")







}



}







function swapBack(id, newSrc) {



    var theImage = FWFindImage(document, id, 0);



    if (theImage) {







    if (document.layers) {



    backto = which;



    } else {



    backto = which;



    }







 	theImage.src = backto;







    }



}







function FWFindImage(doc, name, j) {







    var theImage = false;



    if (doc.images) {



        theImage = doc.images[name];



    }







    if (theImage) {



        return theImage;



    }







    if (doc.layers) {







        for (j = 0; j < doc.layers.length; j++) {



            theImage = FWFindImage(doc.layers[j].document,name,0);



            if (theImage) {



                return (theImage);



            }



        }



    }







    return (false);



}







function swap(id, newSrc) {







    var theImage = FWFindImage(document, id, 0);




    if (theImage) {



        theImage.src = newSrc;



    }



}



