
preload_content = 
"<img src='/images/bullet4_over.gif' border='0' width='4' height='4' style='display:none;'>"+
"<img src='/images/fa_portfolio2_over.gif' border='0' width='7' height='7' style='display:none;'>"+
"<img src='/images/fa_portfolio3_over.gif' border='0' width='19' height='16' style='display:none;'>"+
"<img src='/images/fa_portfolio6.gif' border='0' width='7' height='22' style='display:none;'>"+
"<img src='/images/fa_portfolio8.gif' border='0' width='5' height='22' style='display:none;'>"+
"<img src='/images/ajax-loader.gif' border='0' width='16' height='16' style='display:none;'>";
document.write(preload_content);

function MenuOver(Val,Obj)
{
  if (Val == 0)	
    NowImage = '/images/bullet4.gif';
  else if(Val == 1)
    NowImage = '/images/bullet4_over.gif'; 
  document.getElementById(Obj).src = NowImage;	
}
  
function eCheckEMail(sn){
    s= sn.value;
    if (s.indexOf("@") == -1) return false;
    if (s.indexOf(".") == -1) return false;
    at=false;
    dot=false;
    for (var i = 0; i < s.length; i++) {
        ch = s.substring(i, i + 1)
        if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
                || (ch == "@") || (ch == ".") || (ch == "_")
                || (ch == "-") || (ch >= "0" && ch <= "9")) {
                if (ch == "@"){
                  if (at) return false;
                  else at=true;
                }
                if ((ch==".") && at)
                   dot=true;
        }
        else return false;
    }
   return dot;
}

function CheckEMail(theForm){
   for(var i=1; i<CheckEMail.arguments.length; i++)
         if (!eCheckEMail(theForm.elements[CheckEMail.arguments[i]])){
            alert("Email is not valid.");
            theForm.elements[CheckEMail.arguments[i]].focus();
            return false;
        }
   return true;
}


function CheckRequiredFields(theForm)
{
   for(i=1; i<CheckRequiredFields.arguments.length; i++)
        if(theForm.elements[CheckRequiredFields.arguments[i]].value==""){
            alert("Please enter required field.");
            theForm.elements[CheckRequiredFields.arguments[i]].focus();
            return false;
        }
   return true;
}

function CheckForm(theForm){
     if(CheckRequiredFields(theForm,1,2,3))
     if(CheckEMail(theForm,  4))
          return true;
  return false;
}

//Portfolio

function pfHighlight(type,index,action)
{
  if (type == 'sec' && index == '0')
    var Class = 'portfolio5';	
  else if (type == 'sec')
    var Class = 'portfolio4';
  else if (type == 'site')
    var Class = 'portfolio10';	
    
  var obj = document.getElementById(type+index);	

  if (obj.className == Class+'_clicked')
    return;
  else if (action == 'over')
    obj.className = Class + '_over';
  else if (action == 'out')  
    obj.className = Class;
}

function pfClick(type,index)
{
  pfReset(type);
  	
  if (type == 'sec' && index == '0')
    var Class = 'portfolio5_clicked';	
  else if (type == 'sec')
    var Class = 'portfolio4_clicked';
  else if (type == 'site')
    var Class = 'portfolio10_clicked';
    
  var obj = document.getElementById(type+index);
  obj.className = Class;	
}

function pfReset(type)
{
  for (i=0; ;i++)
  {
  	var thisObj = document.getElementById(type+i);
  	if (!thisObj)
  	  break;
  	  
  	if (type == 'sec' && i == 0)
      var Class = 'portfolio5';	
    else if (type == 'sec')
      var Class = 'portfolio4';
    else if (type == 'site')
      var Class = 'portfolio10';  
  	  
  	thisObj.className = Class;  
  }
}
//End