home *** CD-ROM | disk | FTP | other *** search
- //image
- function ButtonChange (a_img, a_sw) {
- l_Img = new Image();
- if (a_sw == 0) {
- l_Img.src = a_img + 'off.gif';
- }
- if (a_sw == 1) {
- l_Img.src = a_img + 'on.gif';
- }
- if (a_sw == 2) {
- l_Img.src = a_img + 'sel.gif';
- }
- document.images[a_img].src = l_Img.src;
- }
-
- //prihlaska
- function isEmpty(theField) {
- if (theField.value == "") {
- return true;
- }
- else {
- return false;
- }
- }
-
- function isRequired(thisForm) {
- var Empty = false
-
- if (isEmpty(thisForm.Jmeno)) {
- alert("JmΘno - nutno vyplnit...");
- Empty = true;
- }
- if (Empty == false && isEmpty(thisForm.Prijmeni) == true) {
- alert("P°φjmenφ - nutno vyplnit...");
- Empty = true;
- }
- if (Empty == false && isEmpty(thisForm.Bydliste) == true && isEmpty(thisForm.Firma) == true) {
- alert("BydliÜt∞ nebo adresu firmy - nutno vyplnit...");
- Empty = true;
- }
- if (Empty == false && isEmpty(thisForm.Telefon) == true) {
- alert("Telefon - nutno vyplnit...");
- Empty = true;
- }
- if (Empty == false && isEmpty(thisForm.Email) == true) {
- alert("E-mail - nutno vyplnit...");
- Empty = true;
- }
- }
-
- function isPhone(theField) {
-
- var theInput = theField.value;
- var theLength = theInput.length;
- var goodPhone = true;
-
- for (var i = 0; i < theLength; i++) {
- var theChar = theInput.substring(i,i+1)
- if (theChar != " ") {
- if (theChar < "0" || theChar > "9") {
- goodPhone = false;
- }
- }
- }
- if(goodPhone == false) {
- alert("Toto nenφ korektnφ Φφslo: " + theInput);
- }
- }
-