// JavaScript Document
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//TRIM Functions
function Trim(TRIM_VALUE){
	if(TRIM_VALUE.length < 1){
		return"";
	}
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	if(TRIM_VALUE==""){
		return "";
		}
	else{
		return TRIM_VALUE;
		}
} //End Function

function RTrim(VALUE){
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0){
		return"";
		}
		var iTemp = v_length -1;
		while(iTemp > -1){
			if(VALUE.charAt(iTemp) == w_space){
			}
			else{
				strTemp = VALUE.substring(0,iTemp +1);
				break;
			}
			iTemp = iTemp-1;
			} //End While
			return strTemp;
} //End Function

function LTrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";
	var iTemp = 0;
	while(iTemp < v_length){
		if(VALUE.charAt(iTemp) == w_space){
	}
	else{
		strTemp = VALUE.substring(iTemp,v_length);
		break;
	}
	iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function

//end TRIM functions
function toggleBlock(d, i)
{
	var e = MM_findObj(d);
	if(i){
		var img = MM_findObj(i);
	}
	if (!e) return;
	if (e.style.display == "block"){
		e.style.display = "none";
		if(img != null) img.src = "images/icon_expand.gif";
	} else {
		e.style.display = "block";
		if(img != null) img.src = "images/icon_colapse.gif";
	}
}

var active_link = "";

function showAll(link_id) {
	//window.clearTimeout(s);
	
	if(link_id != active_link && active_link != ""){
		hideAll(true);
	}
	
	var image = MM_findObj('btn'+link_id);
	if(!image.over && (image.src.indexOf("-o.gif") == -1)){
		var new_source = image.src.replace(".gif", "-o.gif");
		MM_swapImage('btn'+link_id,'',new_source,1);
		image.over = true;
		MM_showHideLayers('btn89','','show');
	}
	//MM_showHideLayers('drop','','show');
	MM_showHideLayers('box'+link_id,'','show');
	MM_showHideLayers('btn89','','show');
	active_link = link_id;
	
	$('#box'+link_id).hover(function() {
	}, function() {
	    hideAll();
	});
}

function hideAll(now) {
	//if(now){
		hideAllNow()
	//} else {
	//	s = window.setTimeout("hideAllNow()",1000);
	//}
}
function hideAllNow() {
	var link_id = active_link;
	
	var image = MM_findObj('btn'+link_id);
	if(image.over){
		var new_source = image.src.replace("-o.gif", ".gif");
		MM_swapImage('btn'+link_id, '', new_source, 1);
		image.over = false;
	}
	
	MM_showHideLayers('drop','','hide');
	MM_showHideLayers('box'+link_id,'','hide');
//	window.clearTimeout(s);
}

function SubmitLogin(e, btn) {
	/*if(e.keyCode == 13){
		document.getElementById(btn_id).onclick();
	}*/
	if (e.keyCode == 13) {
		 // cancel the default submit 
		 e.returnValue=false; 
		 e.cancel = true; 
		 // submit the form by programmatically clicking the specified button 
		  document.getElementById(btn).click();
		
	} 
}

function CheckLogin(username, password){
	if (Trim(document.getElementById(username).value)=="" || Trim(document.getElementById(password).value)=="")
	 {
		 alert("Please enter your user name and your password");
		 return false;
	}
	else
	{
	   return true;
	}
}

function  ValidateSearch(){
	if (Trim(document.getElementById("ControlLeftMenu1_txtKeyword").value)==""){
		alert("Please enter your keyword");
		return false;
		}
	else{
		return true;
		}
}

function  ValidateDirectorySearch(){
	//if ((Trim(document.getElementById("txtName").value)=="") && document.getElementById("lstCountry").selectedIndex==0 && document.getElementById("txtAttendDateFrom").value=="" && document.getElementById("txtAttendDateTo").value=="" && Trim(document.getElementById("txtOther").value=="") && Trim(&& document.getElementById("txtIntrested").value=="")){
		if ((Trim(document.getElementById("txtName").value)=="") && (document.getElementById("lstCountry").selectedIndex==0) && (document.getElementById("txtAttendDateFrom").value=="") && (document.getElementById("txtAttendDateTo").value=="") && (Trim(document.getElementById("txtOther").value)=="")  && (Trim(document.getElementById("txtIntrested").value)=="") ){
		alert("Please enter your search criteria");
		return false;
		}
	else{
		return true;
		}
}



function ValidateRegister(){
	var msg="";
	var msg1="";
	if (document.Form1.txtUserName.value=="")
		msg+="- User Name\n"
	if (document.Form1.txtPassword.value=="")
		msg+="- Password\n"
	if (document.Form1.txtConfirm.value=="")
		msg+="- Confirm Password\n"
	if ((document.Form1.txtPassword.value)!=(document.Form1.txtConfirm.value))
		msg1+="- New password and its confirmation do not match.\n"	
	if (document.Form1.lstSalutation.selectedIndex==0)
		msg+="- Salutation\n"
	if (document.Form1.txtFName.value=="")
		msg+="- First Name\n"
	if (document.Form1.txtLName.value=="")
		msg+="- Last Name\n"
	if (document.Form1.txtNickName.value=="")
		msg+="- Nick Name\n"
	if (CheckRadioButtons(document.Form1.rbtnGender)==false)
		msg+="- Gender\n"
	if (document.Form1.lstBirthMonth.selectedIndex==0 || document.Form1.lstBrithDay.selectedIndex==0)
		msg+="- Birth Date (Month/Day)\n"
	if (document.Form1.txtEmail.value==""){
		msg+="- Email\n"
		}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (document.Form1.txtConfirmEmail.value=="")
		msg+="- Confirm Email\n"
	if ((document.Form1.txtEmail.value)!=(document.Form1.txtConfirmEmail.value))
		msg1="Email and its confirmation do not match.\n" 
	if (Trim(document.Form1.txtProfession.value)=="")
		msg+="- Profession\n"
	if (Trim(document.Form1.txtCompany.value)=="")
		msg+="- Company\n"
	if (document.Form1.lstCountry.selectedIndex==0)
		msg+="- Country\n"
	if (document.getElementById("TdState1").style.display=="block" && document.Form1.lstState.selectedIndex==0)
		msg +="- State\n"
	if (Trim(document.Form1.txtCity.value)=="")
		msg+="- City\n"
	if (Trim(document.Form1.txtAddress.value)=="")
		msg+="- Address\n"
	if (Trim(document.Form1.txtPhone.value)=="")
		msg+="- Phone\n"
	if (Trim(document.Form1.txtAttendDate1From.value)=="" || Trim(document.Form1.txtAttendDate1To.value)=="")
		msg+="- Attend MEET event in\n"
	if (document.Form1.agree.value==0)
		msg1 +="- Please review and approve the website's terms of use in order to proceed\n"
	if (document.Form1.chkPermission.checked==false)
		msg1 +="- Please approve the permission form\n"
			
		if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
	
	function ValidateEdit(){
	var msg="";
	var msg1="";
	if (document.Form1.txtUserName.value=="")
		msg+="- User Name\n"
	if (document.Form1.lstSalutation.selectedIndex==0)
		msg+="- Salutation\n"
	if (document.Form1.txtFName.value=="")
		msg+="- First Name\n"
	if (document.Form1.txtLName.value=="")
		msg+="- Last Name\n"
	if (document.Form1.txtNickName.value=="")
		msg+="- Nick Name\n"
	if (CheckRadioButtons(document.Form1.rbtnGender)==false)
		msg+="- Gender\n"
	if (document.Form1.lstBirthMonth.selectedIndex==0 || document.Form1.lstBrithDay.selectedIndex==0)
		msg+="- Birth Date (Month/Day)\n"
	if (document.Form1.txtEmail.value==""){
		msg+="- Email\n"
		}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (Trim(document.Form1.txtProfession.value)=="")
		msg+="- Profession\n"
	if (Trim(document.Form1.txtCompany.value)=="")
		msg+="- Company\n"
	if (document.Form1.lstCountry.selectedIndex==0)
		msg+="- Country\n"
	if (document.getElementById("TdState1").style.display=="block" && document.Form1.lstState.selectedIndex==0)
		msg+="- State\n"
	
	if (Trim(document.Form1.txtCity.value)=="")
		msg+="- City\n"
	if (Trim(document.Form1.txtAddress.value)=="")
		msg+="- Address\n"
	if (Trim(document.Form1.txtPhone.value)=="")
		msg+="- Phone\n"
	if (Trim(document.Form1.txtAttendDate1From.value)=="" || Trim(document.Form1.txtAttendDate1To.value)=="")
		msg+="- Attend MEET event in\n"

		if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
		 alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
//Show the other text filed
function ShowHideOther(){

	if (document.getElementById("chkInterestedIn_6").checked==true){
		document.getElementById("txtOtherInterest").style.visibility="visible";
		}
	else{
		document.getElementById("txtOtherInterest").style.visibility="hidden";
		}

}
//validate ForgotPassword form
function ValidateForgot()
{
	if (document.Form1.txtEmail.value==""){
		alert("Please enter your email");
		return false;
	}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
	    if (strvalmail.length>0){
			alert("Please enter a valid email address");
			return false;
	     }
	     else
			return true;
		}
}
//change password
function CheckPassword(){
    if (document.Form1.txtOldpwd.value=="" || document.Form1.txtNewPwd.value=="" || document.Form1.txtConfirm.value=="")
	{
		alert("The following fields are required:\n - Old Password \n - New Password \n - Confirm New Password");
	    return false;
	  }
	else{
		if (document.Form1.txtNewPwd.value!=document.Form1.txtConfirm.value){
			alert("New Password and Confirm New Password do not match");
			return false;
			}
		else{
			return true;
		}
	}
}
//validate gender radiobutton
function CheckRadioButtons(rbtn){
   var check=false;
   var i=0;
   
   for (i=0;i<rbtn.length;i++){
       if(rbtn[i].checked==true) 
       check=true
   } 
  
   if (check==false)
      return false;
   else
      return true;
}

//validate Email
function IsValidEmail(txt){
    var stremail="";
	if(txt.value !=""){ 
		var goodEmail = txt.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if (goodEmail){
		    return true;
		} else {
			stremail="- The Email address is not valid\n";
			return stremail;
		}
	}
}
 

function ShowHideState(){
	if (document.Form1.lstCountry.options[document.Form1.lstCountry.selectedIndex].value=="United States"){
		document.getElementById("TdState1").style.display="block";
		document.getElementById("TdState2").style.display="block";}
	else{
		document.getElementById("TdState1").style.display="none";
		document.getElementById("TdState2").style.display="none";}
	
	
	
}

/*forum*/
function ValidateThread()
{   var msg="";
	if (Trim(document.Form1.txtTitle.value)=="")
		msg+="-Topic Title is required\n";
	
	
	if (msg!="")
	    {alert(msg);
		return false;
		}
    else
		return true;
}

function ValidateSearchForums(){
	var msg="";
	if (Trim(document.getElementById("SearchForums1_txtKeyword").value)=="")
		msg+=" - Keyword is required\n";
    if (document.getElementById("SearchForums1_lstCategories").selectedIndex==0)
		msg+=" - Category is required";
	if (msg!="")
		{alert(msg);
		return false;
	}
	else
		return true;
}

function ValidatePost(){
	var msg="";
	if (Trim(document.getElementById("ControlForumPostDetails1_txtTitle").value)=="")
		msg+=" - Title is required\n";
    if (document.getElementById("ControlForumPostDetails1_txtMessage").value=="")
		msg+=" - Message is required";
	if (msg!="")
		{alert(msg);
		return false;
	}
	else
		return true;
}
/* end forums*/

//validate Poll
function Checkvote(btns, ItemsCount, lang)
{
	var i;
	var ItemChecked=false;
	i=0;
	for (i=0; i< ItemsCount;i++){
		if (document.getElementById(btns + "_" + i ).checked==true)
			ItemChecked=true
	}
	
	if (ItemChecked==true){
			return true;
	}
	else {
		alert("Please select an answer")
		return false;
	}
 }
 
 function ValidateJoinForm(){
	var msg="";
	var msg1="";
	if (Trim(document.Form1.txtEmail.value)=="")
		msg+=" - Email \n"
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (Trim(document.Form1.txtFirstName.value)=="")
		msg+=" - First Name \n"
	if (Trim(document.Form1.txtLastName.value)=="")
		msg+=" - Last Name \n"
	if (document.Form1.lstCountry.selectedIndex==0)
	    msg+=" - Country \n"
	if (Trim(document.Form1.txtTel.value)=="")
		 msg+=" - Telephone \n"
	if (CheckRadioButtons(document.Form1.rdGender)==false)
		 msg+=" - Gender \n"
	
	if (msg==""){
		if (msg1=="")
		   return true
        else
		{
			alert(msg1);
			return false;}
	}
	else{  
	   alert("Please check the following and submit again:\n" + msg )
		return false;
		}
	}
	
function validateCommentForm(){
	var msg="";
	var msg1="";
	if (document.Form1.txtName.value=="")
		msg+="- Your name\n"
	if (document.Form1.lstSalutation.selectedIndex==0)
		msg+="- Salutation\n"
	if (document.Form1.txtEmail.value==""){
		msg+="- Your email\n"
		}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (document.Form1.txtConfirmEmail.value=="")
		msg+="- Confirm your Email\n"
	if ((document.Form1.txtEmail.value)!=(document.Form1.txtConfirmEmail.value))
		msg1="Email and its confirmation do not match.\n" 
	if (Trim(document.Form1.txtComments.value)=="")
		msg+="- Your comment\n"
	if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
	
function validateContactForm(){
	var msg="";
	var msg1="";
	if (document.Form1.txtFirstName.value=="")
		msg+="- First Name\n"
	if (document.Form1.txtLastName.value=="")
		msg+="- Last Name\n"
	if (document.Form1.txtEmail.value==""){
		msg+="- Email\n"
		}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtEmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		}
	if (CheckRadioButtons(document.Form1.rdMeet)==false)
		msg+="- I am a MEET Alumnus / Alumna \n"
	if (document.Form1.lstContactFor.selectedIndex==0)
		msg+="- I am contacting you \n"
	if (document.Form1.txtNotes.value=="")
		msg+="- Comments\n"
	if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
	
/* used to open image in a new window*/
function openIT(u,W,H, sc) {
		var x = (screen.width - W) / 2;
		var y = (screen.height - H) / 2;
		//window.moveBy(left, top);
		window.open(u, '',"width="+W+",height="+H+",scrollbars="+(sc ? "yes" : "no")+", left="+250+",top="+200);
}
function PopImage(img, caption, date, description)
{
	caption = escape(caption);
	date = escape(date);
	description = escape(description);
	openIT('pop_gl.htm?img='+img+"&caption="+caption+"&date="+date+"&description="+description,500,600);
}

function ValidateRequest(){
	var msg="";
	var msg1="";
	if (document.Form1.txtRName.value=="")
		msg+="- Your Name\n"
	if (document.Form1.txtREmail.value==""){
		msg+="- Your Email Address\n"
		}
	else{
		var strvalmail=IsValidEmail(document.Form1.txtREmail);
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (document.Form1.txtREventTitle.value=="")
		msg+="- Event Title\n"
	if (document.Form1.txtREventDate.value=="")
		msg+="- Event Date\n"
	if (document.Form1.lstCountry.selectedIndex==0)
		msg+="- Event Country\n"
	if (document.Form1.txtRShortDescription.value=="")
		msg+="- Short Description\n"
		
		if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
	
	function ValidatePhoto(mode){
	var msg="";
	var msg1="";
	if (document.Form1.txtPhoto.value==""){
		if (mode=="add"){
			msg+="- A valid photo\n"
		}
	}
	else{
		if(!getFileType(document.Form1.txtPhoto.value)){
			msg1 = "- Bad photo extension."
		}
	}
		if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg)
			return false;
		}
	}
	
	
	function getFileType(sValue)
	{
		var aParts = sValue.split( "\\" );
		var sExt = aParts[aParts.length-1].split(".")[1];
		return ((sExt.toLowerCase()=="jpg") || (sExt.toLowerCase()=="gif") || (sExt.toLowerCase()=="jpeg") || (sExt.toLowerCase()=="png"))
	}

function validateconferenceEng(){	
	var msg="";
	if (document.Form1.txtActivity1.value == "")
		msg +="- At least one Activity\n" 
	if (document.Form1.ddlyear1.value == "")
		msg +="- Specify Acitivity Year\n" 
	if (document.Form1.ddlsupport1.value == "")
		msg +="- Specify Acitivity Support\n" 
	if (document.Form1.txtEssay1.value == "")
		msg +="- Essay1\n"
	if (document.Form1.txtEssay2.value == "")
		msg +="- Essay2\n"
	if (document.Form1.txtEssay3.value == "")
		msg +="- Essay3\n"
		
	
	if (msg!=""){
		msg="Please enter the following information:\n" + msg
			alert(msg);
		return false;
		}
		else
	return true; 
	}
	
	function validateconferenceFr(){	
	var msg="";
	if (document.Form1.txtActivity1.value == "")
		msg +="- Au moins une activitee\n" 
	if (document.Form1.ddlyear1.value == "")
		msg +="- Choisir l'annee de l'activitee\n" 
	if (document.Form1.ddlsupport1.value == "")
		msg +="- Choisir le support de l'activitee\n" 
	if (document.Form1.txtEssay1.value == "")
		msg +="- Dissertation1\n"
	if (document.Form1.txtEssay2.value == "")
		msg +="- Dissertation2\n"
	if (document.Form1.txtEssay3.value == "")
		msg +="- Dissertation3\n"
		
	
	if (msg!=""){
		msg="Remplir les informations suivantes:\n" + msg
			alert(msg);
		return false;
		}
		else
	return true; 
	}

// auto fade of main image
var current_img;
var auto_timeout;
var total_imgs;

function showMainImg(index) 
{
    $("#loadarea .main-img").stop().hide();
	$("#loadarea .main-img:eq("+index+")").fadeIn();
	current_img = index;
	if(typeof auto_timeout != "undefined") clearInterval(auto_timeout)
	auto_timeout = setTimeout(function() { 
	    current_img++;
	    if(current_img == total) current_img = 0;
	    showMainImg(current_img); 
	}, 6000)
}

$(document).ready(function()
{
    $("#loadarea .main-img").hide();
	total = $("#loadarea .main-img").length;
	showMainImg(Math.floor(Math.random()*total));
	
	//$("#newsbox .newsdiv:eq(0)").fadeIn();
	$("#mycarousel li").click(function(){
		//$("#newsbox .newsdiv").hide();	
		var index = $("#mycarousel li").index($(this));
		//$("#newsbox .newsdiv:eq("+index+")").fadeIn();
		showMainImg(index);
	});
	
	if(typeof is_arabic != "undefined") {
			if(is_arabic){
				if($.browser.msie) {
				}
			}
	}
	
	jQuery('#mycarousel').jcarousel();
	
	/*jQuery('#mycarousel2').jcarousel();*/

	if(typeof is_arabic != "undefined") {
			if(is_arabic){
				if($.browser.msie) {
				  $("div.jcarousel-skin-tango").addClass("jcarousel-skin-tango-ie");
				}
			}
	}
		
});


/* ---------- SWITCH IMAGE ------------ */
function switchImage(imgURL){
		$('#loadarea').html('<img id="top-img" src="' + imgURL + '" alt="" width="484" height="180" />');
}


/* ---------- MENU COLS ------------ */
var m_rows = 5;
function columnateMenu(div) 
{
    var total_links = $(div).find("a").length;
    var m_cols = Math.ceil(total_links / m_rows);
    var i=-1;
    var res = $("<span></span>");
    for (var c=0; c < m_cols; c++) {
        var last_col = $('<div class="menu-col"></div>').appendTo(res);
        for (var r=0; r < m_rows; r++) {
            i++;
            if(i<total_links) {
                last_col.append($(div).find("a:eq("+i+")").clone());
            }
        }
    }
    last_col.addClass("menu-col-last");
    $(div).empty();
    $(div).append(res);
    $(div).width(225 * m_cols);
}

$(document).ready(function() {
		if($.browser.msie && $.browser.version != 8) {
					$(".jcarousel-container").css ({position:"relative", width:108, margin:"0 auto", top:0, left:-70});
					$(".newsdiv").css("margin", 5);
					$(".news-title").css("margin", 5);
					$("#newsbox").css("height", 175);
				}else {
					// Other sane browsers
					$(".jcarousel-container").css ({position:"relative", width:108, margin:"0 auto"});
				}
    $(".hold-in").each(function() {
        columnateMenu(this);
    });
		$("hold-in").mouseover(function() {
																			
	  });
		
});




function ValidatePosting(){
	var msg="";
	var msg1="";
	if (MM_findObj("ControlPostingOpportunity1_txtFname").value=="")
		msg+="- First Name\n"
	if (MM_findObj("ControlPostingOpportunity1_txtLname").value=="")
		msg+="- Last Name\n"
	if (MM_findObj("ControlPostingOpportunity1_txtEmail").value==""){
		msg+="- Email\n"
		}
	else{
		var strvalmail=IsValidEmail(MM_findObj("ControlPostingOpportunity1_txtEmail"));
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (MM_findObj("ControlPostingOpportunity1_txtPhone").value=="")
		msg+="- Phone\n"
	if (MM_findObj("ControlPostingOpportunity1_txtOrganization").value=="")
		msg+="- Organization\n"
	if (MM_findObj("ControlPostingOpportunity1_txtTitle").value=="")
		msg+="- Opportunity Title\n"
	if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
function ValidatePostingdetails(){
	var msg="";
	var msg1="";
	if (MM_findObj("txtFname").value=="")
		msg+="- First Name\n"
	if (MM_findObj("txtLname").value=="")
		msg+="- Last Name\n"
	if (MM_findObj("txtEmail").value==""){
		msg+="- Email\n"
		}
	else{
		var strvalmail=IsValidEmail(MM_findObj("txtEmail"));
		if (strvalmail.length>0)
			msg1+=strvalmail
		} 
	if (MM_findObj("txtPhone").value=="")
		msg+="- Phone\n"
	if (MM_findObj("txtOrganization").value=="")
		msg+="- Organization\n"
	if (msg==""){
			if (msg1=="")
				return true
			else{
				alert(msg1);
				return false;
			}
		}
		else{ 
			alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg )
			return false;
		}
	}
function OpenWindow(URL)
{
	openIT(URL,660,480);
}

function validateMessage() {
	var msg="";
	if (MM_findObj("txtSubject").value=="")
		msg+="- Subject\n"
	if (MM_findObj("txtMessage").value=="")
		msg+="- Message\n"
	if (msg==""){
		return true;
		}
	else{
		alert("The following fields are required,\n please be sure to fill them and try again:\n\n" + msg);
		return false;
		}
	}