<!--


function openNugget(url){
	viewWindow = window.open(url, 'eLearning', 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=1,height=1');
	if (viewWindow != null && !viewWindow.closed){
		viewWindow.resizeTo(680,570);
		viewWindow.moveTo((screen.width-680)/2,(screen.height-570)/5);
		viewWindow.focus();
	}
}

//Opens a new pop-up window and plays the Exercise...
function openExercise(url){
	viewWindow = window.open(url, 'eLearning', 'statusbar=no,resizable=no,toolbar=no,scrollbars=no,width=1,height=1');
	if (viewWindow != null && !viewWindow.closed){
		viewWindow.resizeTo(650,545);
		viewWindow.moveTo((screen.width-650)/2,(screen.height-545)/5);
		viewWindow.focus();
	}
}



function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('Please fill the following fields:\n'+errors);
  document.MM_returnValue = (errors == '');
}



var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();



function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		case_study_over = newImage("images/case_study-over.jpg");
		email_marketing_over = newImage("images/email_marketing-over.jpg");
		latest_work_over = newImage("images/latest_work-over.jpg");
		preloadFlag = true;
	}
}




function validateContact(form)
 { 
var error="";
// empty ****************************************


if (document.form1.name.value=="")
 error+="...Enter your Name.\n";

if (document.form1.email.value=="")
 error+="...Enter your Email.\n";


if(error !="")
{
alert("Please correctly fill these fields:\n" + error);
return false;
}

if(document.form1.email.value.indexOf('@') == -1 || document.form1.email.value.indexOf('.') == -1)
 error+="...A valid email address\n";

if(error !="")
{
alert("please correctly fill these fields:\n" + error);
return false;
}




return true;
 } // end function
 





function validateContact(form)
 { 
var error="";
// empty ****************************************


if (document.form1.name.value=="")
 error+="...Enter your Name.\n";


if (document.form1.email.value=="")
 error+="...Enter your Email.\n";




if(error !="")
{
alert("Please correctly fill these fields:\n" + error);
return false;
}

if(document.form1.email.value.indexOf('@') == -1 || document.form1.email.value.indexOf('.') == -1)
 error+="...A valid email address\n";

if(error !="")
{
alert("please correctly fill these fields:\n" + error);
return false;
}




return true;
 } // end function
 



// -->