function jobssubmit()
{
  var choice = document.formularz.category.selectedIndex;
if (document.formularz.title.value == ""){
 document.formularz.title.style.backgroundColor="#FF9595";} else { document.formularz.title.style.backgroundColor="white";}
if (document.formularz.category.options[choice].text == ""){
 document.formularz.category.options[choice].style.backgroundColor="#FF9595";} else { document.formularz.category.options[choice].style.backgroundColor="white";}
if (document.formularz.name.value == ""){
 document.formularz.name.style.backgroundColor="#FF9595";} else { document.formularz.name.style.backgroundColor="white";}
if (document.formularz.email.value == ""){
 document.formularz.email.style.backgroundColor="#FF9595";} else { document.formularz.email.style.backgroundColor="white";}
if (document.formularz.location.value == ""){
 document.formularz.location.style.backgroundColor="#FF9595";} else { document.formularz.location.style.backgroundColor="white";}

if (!(!(document.formularz.title.value == "") &&
!(document.formularz.category.options[choice].text == "") &&
!(document.formularz.name.value == "")&&
!(document.formularz.email.value == "")&&
!(document.formularz.location.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}

function automotosubmit()
{
  var choice = document.formularz.vehicletype.selectedIndex;
  var choice1 = document.formularz.make.selectedIndex;
if (document.formularz.price.value == ""){
 document.formularz.price.style.backgroundColor="#FF9595";} else { document.formularz.price.style.backgroundColor="white";}
if (document.formularz.vehicletype.options[choice].text == ""){
 document.formularz.vehicletype.options[choice].style.backgroundColor="#FF9595";} else { document.formularz.vehicletype.options[choice].style.backgroundColor="white";}
if (document.formularz.make.options[choice1].text == ""){
 document.formularz.make.options[choice1].style.backgroundColor="#FF9595";} else { document.formularz.make.options[choice1].style.backgroundColor="white";}
if (document.formularz.name.value == ""){
 document.formularz.name.style.backgroundColor="#FF9595";} else { document.formularz.name.style.backgroundColor="white";}
if (document.formularz.email.value == ""){
 document.formularz.email.style.backgroundColor="#FF9595";} else { document.formularz.email.style.backgroundColor="white";}

if (!(!(document.formularz.price.value == "") &&
!(document.formularz.vehicletype.options[choice].text == "") &&
!(document.formularz.make.options[choice1].text == "") &&
!(document.formularz.name.value == "")&&
!(document.formularz.email.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}

function forsalesubmit()
{
  var choice = document.formularz.category.selectedIndex;
if (document.formularz.price.value == ""){
 document.formularz.price.style.backgroundColor="#FF9595";} else { document.formularz.price.style.backgroundColor="white";}
if (document.formularz.category.options[choice].text == ""){
 document.formularz.category.options[choice].style.backgroundColor="#FF9595";} else { document.formularz.category.options[choice].style.backgroundColor="white";}
if (document.formularz.whatisit.value == ""){
 document.formularz.whatisit.style.backgroundColor="#FF9595";} else { document.formularz.whatisit.style.backgroundColor="white";}
if (document.formularz.name.value == ""){
 document.formularz.name.style.backgroundColor="#FF9595";} else { document.formularz.name.style.backgroundColor="white";}
if (document.formularz.email.value == ""){
 document.formularz.email.style.backgroundColor="#FF9595";} else { document.formularz.email.style.backgroundColor="white";}

if (!(!(document.formularz.price.value == "") &&
!(document.formularz.category.options[choice].text == "") &&
!(document.formularz.whatisit.value == "")&&
!(document.formularz.name.value == "")&&
!(document.formularz.email.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}

function realestatesubmit()
{
  var choice = document.formularz.type.selectedIndex;
if (document.formularz.price.value == ""){
 document.formularz.price.style.backgroundColor="#FF9595";} else { document.formularz.price.style.backgroundColor="white";}
if (document.formularz.type.options[choice].text == ""){
 document.formularz.type.options[choice].style.backgroundColor="#FF9595";} else { document.formularz.type.options[choice].style.backgroundColor="white";}
if (document.formularz.name.value == ""){
 document.formularz.name.style.backgroundColor="#FF9595";} else { document.formularz.name.style.backgroundColor="white";}
if (document.formularz.email.value == ""){
 document.formularz.email.style.backgroundColor="#FF9595";} else { document.formularz.email.style.backgroundColor="white";}
if (document.formularz.address3.value == ""){
 document.formularz.address3.style.backgroundColor="#FF9595";} else { document.formularz.address3.style.backgroundColor="white";}
if (document.formularz.address4.value == ""){
 document.formularz.address4.style.backgroundColor="#FF9595";} else { document.formularz.address4.style.backgroundColor="white";}

if (!(!(document.formularz.price.value == "") &&
!(document.formularz.type.options[choice].text == "") &&
!(document.formularz.name.value == "")&&
!(document.formularz.email.value == "")&&
!(document.formularz.address3.value == "")&&
!(document.formularz.address4.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}

function servicessubmit()
{
  var choice = document.formularz.category.selectedIndex;
if (document.formularz.category.options[choice].text == ""){
 document.formularz.category.options[choice].style.backgroundColor="#FF9595";} else { document.formularz.category.options[choice].style.backgroundColor="white";}
if (document.formularz.name.value == ""){
 document.formularz.name.style.backgroundColor="#FF9595";} else { document.formularz.name.style.backgroundColor="white";}
if (document.formularz.email.value == ""){
 document.formularz.email.style.backgroundColor="#FF9595";} else { document.formularz.email.style.backgroundColor="white";}

if (!(!(document.formularz.category.options[choice].text == "") &&
!(document.formularz.name.value == "")&&
!(document.formularz.email.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}



function change_location(x,y)
{
  var c = document.cookie;
  var tempArray = new Array();
  tempArray = c.split('; ');


  // zapisuje pary (state Florida)
if (tempArray.length>0) {var jeden = tempArray[0]; var tempJeden = new Array(); tempJeden = jeden.split('='); jedenNazwa = tempJeden[0]; jedenWartosc = tempJeden[1];}
if (tempArray.length>1) {var dwa = tempArray[1]; var tempDwa = new Array(); tempDwa = dwa.split('='); dwaNazwa = tempDwa[0]; dwaWartosc = tempDwa[1];}
if (tempArray.length>2) {var trzy = tempArray[2]; var tempTrzy = new Array(); tempTrzy = trzy.split('='); trzyNazwa = tempTrzy[0]; trzyWartosc = tempTrzy[1];}
if (tempArray.length>3) {var cztery = tempArray[3]; var tempCztery = new Array(); tempCztery = cztery.split('='); czteryNazwa = tempCztery[0]; czteryWartosc = tempCztery[1];}
if (tempArray.length>4) {var piec = tempArray[4]; var tempPiec = new Array(); tempPiec = piec.split('='); piecNazwa = tempPiec[0]; piecWartosc = tempPiec[1];}
if (tempArray.length>5) {var szesc = tempArray[5]; var tempSzesc = new Array(); tempSzesc = szesc.split('='); szescNazwa = tempSzesc[0]; szescWartosc = tempSzesc[1];}
if (tempArray.length>6) {var siedem = tempArray[6]; var tempSiedem = new Array(); tempSiedem = siedem.split('='); siedemNazwa = tempSiedem[0]; siedemWartosc = tempSiedem[1];}
if (tempArray.length>7) {var osiem = tempArray[7]; var tempOsiem = new Array(); tempOsiem = osiem.split('='); osiemNazwa = tempOsiem[0]; osiemWartosc = tempOsiem[1];}
if (tempArray.length>8) {var dziewiec = tempArray[8]; var tempdziewiec = new Array(); tempDziewiec = dziewiec.split('='); dziewiecNazwa = tempDziewiec[0]; dziewiecWartosc = tempDziewiec[1];}
if (tempArray.length>9) {var dziesiec = tempArray[9]; var tempDziesiec = new Array(); tempDziesiec = dziesiec.split('='); dziesiecNazwa = tempDziesiec[0]; dziesiecWartosc = tempDziesiec[1];}

  //przypisuje wartosc dla state1 i city1
if (tempArray.length>0) if ((jedenNazwa == 'city') & (tempArray[0] != undefined))   document.cookie = "city1="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'city') & (tempArray[1] != undefined))   document.cookie = "city1="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'city') & (tempArray[2] != undefined))   document.cookie = "city1="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'city') & (tempArray[3] != undefined))   document.cookie = "city1="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'city') & (tempArray[4] != undefined))   document.cookie = "city1="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'city') & (tempArray[5] != undefined))   document.cookie = "city1="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'city') & (tempArray[6] != undefined))   document.cookie = "city1="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'city') & (tempArray[7] != undefined))   document.cookie = "city1="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'city') & (tempArray[8] != undefined))   document.cookie = "city1="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'city') & (tempArray[9] != undefined))   document.cookie = "city1="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>0) if ((jedenNazwa == 'state') & (tempArray[0] != undefined))   document.cookie = "state1="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'state') & (tempArray[1] != undefined))   document.cookie = "state1="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'state') & (tempArray[2] != undefined))   document.cookie = "state1="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'state') & (tempArray[3] != undefined))   document.cookie = "state1="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'state') & (tempArray[4] != undefined))   document.cookie = "state1="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'state') & (tempArray[5] != undefined))   document.cookie = "state1="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'state') & (tempArray[6] != undefined))   document.cookie = "state1="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'state') & (tempArray[7] != undefined))   document.cookie = "state1="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'state') & (tempArray[8] != undefined))   document.cookie = "state1="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'state') & (tempArray[9] != undefined))   document.cookie = "state1="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";

  //przypisuje wartosc dla state2 i city2
if (tempArray.length>0) if ((jedenNazwa == 'city1') & (tempArray[0] != undefined))   document.cookie = "city2="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'city1') & (tempArray[1] != undefined))   document.cookie = "city2="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'city1') & (tempArray[2] != undefined))   document.cookie = "city2="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'city1') & (tempArray[3] != undefined))   document.cookie = "city2="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'city1') & (tempArray[4] != undefined))   document.cookie = "city2="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'city1') & (tempArray[5] != undefined))   document.cookie = "city2="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'city1') & (tempArray[6] != undefined))   document.cookie = "city2="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'city1') & (tempArray[7] != undefined))   document.cookie = "city2="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'city1') & (tempArray[8] != undefined))   document.cookie = "city2="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'city1') & (tempArray[9] != undefined))   document.cookie = "city2="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>0) if ((jedenNazwa == 'state1') & (tempArray[0] != undefined))   document.cookie = "state2="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'state1') & (tempArray[1] != undefined))   document.cookie = "state2="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'state1') & (tempArray[2] != undefined))   document.cookie = "state2="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'state1') & (tempArray[3] != undefined))   document.cookie = "state2="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'state1') & (tempArray[4] != undefined))   document.cookie = "state2="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'state1') & (tempArray[5] != undefined))   document.cookie = "state2="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'state1') & (tempArray[6] != undefined))   document.cookie = "state2="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'state1') & (tempArray[7] != undefined))   document.cookie = "state2="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'state1') & (tempArray[8] != undefined))   document.cookie = "state2="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'state1') & (tempArray[9] != undefined))   document.cookie = "state2="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";

  //przypisuje wartosc dla state3 i city3
if (tempArray.length>0) if ((jedenNazwa == 'city2') & (tempArray[0] != undefined))   document.cookie = "city3="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'city2') & (tempArray[1] != undefined))   document.cookie = "city3="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'city2') & (tempArray[2] != undefined))   document.cookie = "city3="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'city2') & (tempArray[3] != undefined))   document.cookie = "city3="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'city2') & (tempArray[4] != undefined))   document.cookie = "city3="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'city2') & (tempArray[5] != undefined))   document.cookie = "city3="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'city2') & (tempArray[6] != undefined))   document.cookie = "city3="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'city2') & (tempArray[7] != undefined))   document.cookie = "city3="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'city2') & (tempArray[8] != undefined))   document.cookie = "city3="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'city2') & (tempArray[9] != undefined))   document.cookie = "city3="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>0) if ((jedenNazwa == 'state2') & (tempArray[0] != undefined))   document.cookie = "state3="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'state2') & (tempArray[1] != undefined))   document.cookie = "state3="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'state2') & (tempArray[2] != undefined))   document.cookie = "state3="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'state2') & (tempArray[3] != undefined))   document.cookie = "state3="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'state2') & (tempArray[4] != undefined))   document.cookie = "state3="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'state2') & (tempArray[5] != undefined))   document.cookie = "state3="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'state2') & (tempArray[6] != undefined))   document.cookie = "state3="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'state2') & (tempArray[7] != undefined))   document.cookie = "state3="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'state2') & (tempArray[8] != undefined))   document.cookie = "state3="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'state2') & (tempArray[9] != undefined))   document.cookie = "state3="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";

  //przypisuje wartosc dla state4 i city4
if (tempArray.length>0) if ((jedenNazwa == 'city3') & (tempArray[0] != undefined))   document.cookie = "city4="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'city3') & (tempArray[1] != undefined))   document.cookie = "city4="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'city3') & (tempArray[2] != undefined))   document.cookie = "city4="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'city3') & (tempArray[3] != undefined))   document.cookie = "city4="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'city3') & (tempArray[4] != undefined))   document.cookie = "city4="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'city3') & (tempArray[5] != undefined))   document.cookie = "city4="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'city3') & (tempArray[6] != undefined))   document.cookie = "city4="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'city3') & (tempArray[7] != undefined))   document.cookie = "city4="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'city3') & (tempArray[8] != undefined))   document.cookie = "city4="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'city3') & (tempArray[9] != undefined))   document.cookie = "city4="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>0) if ((jedenNazwa == 'state3') & (tempArray[0] != undefined))   document.cookie = "state4="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'state3') & (tempArray[1] != undefined))   document.cookie = "state4="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'state3') & (tempArray[2] != undefined))   document.cookie = "state4="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'state3') & (tempArray[3] != undefined))   document.cookie = "state4="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'state3') & (tempArray[4] != undefined))   document.cookie = "state4="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'state3') & (tempArray[5] != undefined))   document.cookie = "state4="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'state3') & (tempArray[6] != undefined))   document.cookie = "state4="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'state3') & (tempArray[7] != undefined))   document.cookie = "state4="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'state3') & (tempArray[8] != undefined))   document.cookie = "state4="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'state3') & (tempArray[9] != undefined))   document.cookie = "state4="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";

  //przypisuje wartosc dla state5 i city5
if (tempArray.length>0) if ((jedenNazwa == 'city4') & (tempArray[0] != undefined))   document.cookie = "city5="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'city4') & (tempArray[1] != undefined))   document.cookie = "city5="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'city4') & (tempArray[2] != undefined))   document.cookie = "city5="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'city4') & (tempArray[3] != undefined))   document.cookie = "city5="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'city4') & (tempArray[4] != undefined))   document.cookie = "city5="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'city4') & (tempArray[5] != undefined))   document.cookie = "city5="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'city4') & (tempArray[6] != undefined))   document.cookie = "city5="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'city4') & (tempArray[7] != undefined))   document.cookie = "city5="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'city4') & (tempArray[8] != undefined))   document.cookie = "city5="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'city4') & (tempArray[9] != undefined))   document.cookie = "city5="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>0) if ((jedenNazwa == 'state4') & (tempArray[0] != undefined))   document.cookie = "state5="+jedenWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>1) if ((dwaNazwa == 'state4') & (tempArray[1] != undefined))   document.cookie = "state5="+dwaWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>2) if ((trzyNazwa == 'state4') & (tempArray[2] != undefined))   document.cookie = "state5="+trzyWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>3) if ((czteryNazwa == 'state4') & (tempArray[3] != undefined))   document.cookie = "state5="+czteryWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>4) if ((piecNazwa == 'state4') & (tempArray[4] != undefined))   document.cookie = "state5="+piecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>5) if ((szescNazwa == 'state4') & (tempArray[5] != undefined))   document.cookie = "state5="+szescWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>6) if ((siedemNazwa == 'state4') & (tempArray[6] != undefined))   document.cookie = "state5="+siedemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>7) if ((osiemNazwa == 'state4') & (tempArray[7] != undefined))   document.cookie = "state5="+osiemWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>8) if ((dziewiecNazwa == 'state4') & (tempArray[8] != undefined))   document.cookie = "state5="+dziewiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
if (tempArray.length>9) if ((dziesiecNazwa == 'state4') & (tempArray[9] != undefined))   document.cookie = "state5="+dziesiecWartosc+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";


  document.cookie = "city="+escape(x)+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";
  document.cookie = "state="+escape(y)+" ; expires=Fri, 03-Jan-2014 08:00:00 GMT; path=/;";

}

function isInteger(field){
  var s = field.value;
  if (!(/^-?\d+$/.test(s)))
  {
    alert("Price field must contain only digits");
    field.focus();
    field.value='';
    return false
  }
  return true;
}

function isPhoneInteger(field){
  var s = field.value;
  if (!(/^-?\d+$/.test(s)))
  {
    alert("Phone field must contain only digits");
    field.focus();
    field.value='';
    return false
  }
  return true;
}

function password_check(){
if(document.register.password.value != document.register.retype_password.value)
  {
    alert("Re-typed Password does not match the Password. Please re-type the Password");
    document.register.password.value='';
    document.register.retype_password.value='';
    document.register.password.focus();
    return false;
  }
return true;
}

function form_check()
{
if (document.register.firstname.value == ""){
 document.register.firstname.style.backgroundColor="#FF9595";} else { document.register.firstname.style.backgroundColor="white";}
if (document.register.lastname.value == ""){
 document.register.lastname.style.backgroundColor="#FF9595";} else { document.register.lastname.style.backgroundColor="white";}
if (document.register.email.value == ""){
 document.register.email.style.backgroundColor="#FF9595";} else { document.register.email.style.backgroundColor="white";}
if (document.register.login.value == ""){
 document.register.login.style.backgroundColor="#FF9595";} else { document.register.login.style.backgroundColor="white";}
if (document.register.password.value == ""){
 document.register.password.style.backgroundColor="#FF9595";} else { document.register.password.style.backgroundColor="white";}
if (document.register.retype_password.value == ""){
 document.register.retype_password.style.backgroundColor="#FF9595";} else { document.register.retype_password.style.backgroundColor="white";}

if (!(!(document.register.firstname.value == "") &&
!(document.register.lastname.value == "")&&
!(document.register.email.value == "")&&
!(document.register.login.value == "")&&
!(document.register.password.value == "")&&
!(document.register.retype_password.value == "")
))
{
alert("You must fill in all required fields");
return false;
}
else return true;
}

function link()
{

 document.anchor.xc.style.backgroundColor="#FF9595";
}


function bookmark(title, url)
{
    if (window.sidebar) // firefox
      {
         window.sidebar.addPanel(title, url, "");
      }
      else if (window.opera && window.print) // opera
      {
         var element = document.createElement("a");
         element.setAttribute("href", url);
         element.setAttribute("title", title);
         element.setAttribute("rel", "sidebar");
         element.click();
      }
      else if (document.all) // ie
      {
         window.external.AddFavorite(url, title);
      }
   }

function enable_submit(){
    if(document.register.terms.checked==false){
     document.register.submit.disabled=true;
     document.register.submit.style.color='#999999';
     document.register.submit.style.background='#EEEEEE';
    }
    else
    {
     document.register.submit.disabled=false;
     document.register.submit.style.color='#FFFFFF';
     document.register.submit.style.background='#FF6600';
   }
}

function add_www_to_address(){
var loc=window.location;
var myStr=new String(loc);
var w=myStr.substring(7,10);
if(w!="www"){
  var poczatek=myStr.substring(0,7);
  var koniec=myStr.substring(7);
  var caly = poczatek + "www." + koniec;
  window.location=caly;
}
}

function insRow()
{
var oRows = document.getElementById('myTable').getElementsByTagName('tr');
var iRowCount = oRows.length;
if (iRowCount<10){
    var pozycja = iRowCount+1;
    var x=document.getElementById('myTable').insertRow(iRowCount);
    var y=x.insertCell(0);
    var z=x.insertCell(1);
    y.innerHTML="<input type='file' name='userfile"+pozycja+"'>";
    z.innerHTML="<input type='button' value='Delete' onclick='deleteRow(this)'>";
}
else{
  alert("You can upload only 10 pictures at a time");
}
}

function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('myTable').deleteRow(i);
}

function mouse_over_the_gray_ad(x)
{
  document.body.style.cursor='pointer';
  x.style.backgroundColor="#E0EBBA";

}
function mouse_out_of_gray_ad(x)
{
  document.body.style.cursor='default';
  x.style.backgroundColor="#F4F8E7";

}

function mouse_over_the_white_ad(x)
{
  document.body.style.cursor='pointer';
  x.style.backgroundColor="#E0EBBA";

}
function mouse_out_of_white_ad(x)
{
  document.body.style.cursor='default';
  x.style.backgroundColor="#FFFFFF";

}