
function CreatePrintVersionLink(currentPageID,searchValue)
{
	var WinPrint = window.open('PrintVersion.aspx?pageID=' + currentPageID + '&search=' + searchValue);
}

function openWindow(theURL,winName,features) { 
    if(features=="")
        features = "scrollbars=1, menubars=0, toolbars=0, location=0, directories=0, status=0, width=940, height=700, top=0, left=0, resizable=1";    
    window.open(theURL,winName,features);
}

function ValidateNewsLetter(formname) {
    if(formname.txtEmail.value=="" || !isValidEmail(formname.txtEmail.value)){
        document.getElementById("msg").innerHTML='Invalid email address.';
        return false;
    }
    formname.submit();
}

function ValidateAskUs(formname) {
    if(formname.txtEmail.value=="" || !isValidEmail(formname.txtEmail.value)){
        document.getElementById("msg").innerHTML='Invalid email address.';
        return false;
    }
    formname.submit();
}

function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function ShowHide()
{    
    if(document.getElementById('att').style.display=='none') {
        document.getElementById('att').style.display='';
        window.scrollBy(0,80);
    }
    else {
        document.getElementById('att').style.display='none';        
    }
        
}


function InitVirtualBonding(id)
{
   	$('#' + id).click(function(){
	$('#hdnLink').attr('value',$('#' + id).attr('href'));
	$('#hdnSection').attr('value',$('#' + id).attr('title'));
	$('#divBlackScreen').show();
	$('#vbHiddenDiv').show();
	return false;
});
}

function ValidateVirtualBonding(formname)
{
    if(formname.txtEmail.value=="" || !isValidEmail(formname.txtEmail.value)){
        document.getElementById("msg2").innerHTML='Invalid email address.';
        return false;
    }
    formname.submit();
location.href = $('#hdnLink').attr('value');
	   

}
