<!-- Begin
function bookmark(url, description) {
   netscape="Netscape User's hit CTRL+D to add a bookmark to this site."
   if (navigator.appName=='Microsoft Internet Explorer') {
      window.external.AddFavorite(url, description);
   } else if (navigator.appName=='Netscape') {
      alert(netscape);
   }
}

function checkFields() {
missinginfo = "";
var digits="0123456789-/( )";


if (document.calform.name.value=="") {
   missinginfo += "\n     -  Your Name";
}

if ((document.calform.emailFrom.value == "") || 
(document.calform.emailFrom.value.indexOf('@') == -1) || 
(document.calform.emailFrom.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Your e-mail [***@**.***]";
}

if (document.calform.emailTo.value=="-1") {
   missinginfo += "\n     -  Subject";
}


if (document.calform.emailBody.value=="") {
   missinginfo += "\n     -  Your Message";
}



if (missinginfo != "") {
missinginfo =   "_________________________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo +"\n_________________________________________" +  
"\nPlease verify and submit again!";

alert(missinginfo);
return false;
}
else return true;
}

function checkField() {
missinginfo = "";

if (document.searchform.KEYWORD.value=="") {
   missinginfo += "The search-box cannot be empty";
}                       

if (missinginfo != "") {
missinginfo =   " -------==  E R R O R !  ==-------\n\n" + missinginfo ;

alert(missinginfo);
return false;
}
else return true;
}


function coupon() {
missinginfo = "";

if ((document.calform.emailFrom.value == "") || 
(document.calform.emailFrom.value.indexOf('@') == -1) || 
(document.calform.emailFrom.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Your e-mail [***@**.***]";
}


if (missinginfo != "") {
missinginfo =   "_________________________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo +"\n_________________________________________" +  
"\nPlease verify and submit again!";

alert(missinginfo);
return false;
}
else return true;
}


function board() {
missinginfo = "";

MSG = document.calform.message.value.toLowerCase();
SBJ = document.calform.subject.value.toLowerCase();

if (document.calform.name.value=="") {
   missinginfo += "\n     -  Name";
}

if (document.calform.subject.value=="") {
   missinginfo += "\n     -  Subject";
}else{
   if(
        (SBJ.indexOf('http') >= 0) || 
	(SBJ.indexOf('www') >= 0) ||
	(SBJ.indexOf('url') >= 0) ||
	(SBJ.indexOf('sex') >= 0) ||
	(SBJ.indexOf('porno') >= 0) ||
	(SBJ.indexOf('girl') >= 0) ||
	(SBJ.indexOf('free') >= 0) ||
	(SBJ.indexOf('online') >= 0) ||
	(SBJ.indexOf('viagra') >= 0) ||
	(SBJ.indexOf('vicodin') >= 0) ||
	(SBJ.indexOf('.php') >= 0) ||
	(SBJ.indexOf('.asp') >= 0) ||
	(SBJ.indexOf('.jsp') >= 0) ||
	(SBJ.indexOf('cheap') >= 0) ||
	(SBJ.indexOf('cigarette') >= 0) ||
	(SBJ.indexOf('wanted') >= 0) ||
	(SBJ.indexOf('home') >= 0) ||
	(SBJ.indexOf('href') >= 0) ||
	(SBJ.indexOf('adult') >= 0) ||
	(SBJ.indexOf('site') >= 0) ||
	(SBJ.indexOf('.htm') >= 0) 
     ) 
	   missinginfo += "\n     -  Subject: (This content is not allowed.)";
}


if ((document.calform.email.value == "") || 
(document.calform.email.value.indexOf('@') == -1) || 
(document.calform.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email [***@**.***]";
}

if (document.calform.message.value=="") {
    missinginfo += "\n     -  Message";
}else{
   if(
        (MSG.indexOf('http') >= 0) || 
	(MSG.indexOf('www') >= 0) ||
	(MSG.indexOf('url') >= 0) ||
	(MSG.indexOf('sex') >= 0) ||
	(MSG.indexOf('porno') >= 0) ||
	(MSG.indexOf('girl') >= 0) ||
	(MSG.indexOf('free') >= 0) ||
	(MSG.indexOf('online') >= 0) ||
	(MSG.indexOf('viagra') >= 0) ||
	(MSG.indexOf('vicodin') >= 0) ||
	(MSG.indexOf('hiring') >= 0) ||
	(MSG.indexOf('adult') >= 0) ||
	(MSG.indexOf('href') >= 0) ||
	(MSG.indexOf('.php') >= 0) ||
	(MSG.indexOf('.asp') >= 0) ||
	(MSG.indexOf('.jsp') >= 0) ||
	(MSG.indexOf('.htm') >= 0) 
     ) 
	   missinginfo += "\n     -  Message: (This content is not allowed.)";
}



if (missinginfo != "") {
missinginfo =   "_________________________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo +"\n_________________________________________" +  
"\nPlease verify and submit again!";

alert(missinginfo);
return false;
}
else return true;
}



function checkOrder() {
missinginfo = "";
var digits="0123456789";

if (document.orderform.kalvinsorder.value=="") {
missinginfo += "The box cannot be empty!";
}
else{
for (var i=0;i<document.orderform.kalvinsorder.value.length;i++){
temp=document.orderform.kalvinsorder.value.substring(i,i+1)
if (digits.indexOf(temp)==-1){
     missinginfo += "Must be digital only! [please, use 0123456789]";
     i=document.orderform.kalvinsorder.value.length;
     }
   }
}

if (missinginfo != "") {
missinginfo =   " -------==  E R R O R !  ==-------\n\n" + missinginfo ;

alert(missinginfo);
return false;
}
else return true;
}

var version4 = (navigator.appVersion.charAt(0) == "4"); 
var popupHandle;
function closePopup() {
if(popupHandle != null && !popupHandle.closed) popupHandle.close();
}
function displayPopup(position,url,name,height,width,evnt) {

var properties = "toolbar = 0, location = 0, height = " + height;
properties = properties + ", width=" + width;
var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
if(navigator.appName == "Microsoft Internet Explorer") {
screenY = document.body.offsetHeight;
screenX = window.screen.availWidth;
}
else {
screenY = window.outerHeight
screenX = window.outerWidth
}

leftvar = (screenX - width) / 2;
rightvar = (screenY - height) / 2;
if(navigator.appName == "Microsoft Internet Explorer") {
leftprop = leftvar;
topprop = rightvar;
}
else {
leftprop = (leftvar - pageXOffset);
topprop = (rightvar - pageYOffset);
   }

if(evnt != null) {
properties = properties + ", left = " + leftprop;
properties = properties + ", top = " + topprop;
}
closePopup();
popupHandle = open(url,name,properties);
}




function lookup(){
missinginfo = "";
var digits="0123456789-/( )";


if (document.calform.on.value=="") {
   missinginfo += "\n     -  Order Number";
}

if ((document.calform.emailFrom.value == "") || 
(document.calform.emailFrom.value.indexOf('@') == -1) || 
(document.calform.emailFrom.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Your e-mail [***@**.***]";
}



 if (missinginfo != "") {
  missinginfo =   "_________________________________________\n" +
  "You failed to correctly fill in your:\n" +
  missinginfo +"\n_________________________________________";

  alert(missinginfo);
  return false;
 }else{
  var o = document.calform.on.value;
  var e = document.calform.emailFrom.value;
  open_url('../ajax/order.php?o='+o+'&e='+e,'target');
  return true;
 }
}

//  End -->

