
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}



function openwindow_fb(file,wd,ht)
{
var wd1 = eval(Math.round(wd)+36);
var ht1 = eval(Math.round(ht)+30);
url = file;
var hWnd = window.open(url,"openwindow","left=10,top=10,width="+wd1+",height="+ht1+",resizable=no,scrollbars=no");
    if (!hWnd.opener) hWnd.opener = self;
	if (hWnd.focus != null) hWnd.focus();
}




function isBlank(fieldname,varstr) 
{        
        if(varstr.length != 0)
      for(var i=0; i < varstr.length ; i++)            
        { 
        var ch = varstr.substring(i, i+1);                
        if(ch != " ")                
                {                
                return true;                
                break;                
                }                
        else                
                {                
                return false;                
                break;
            }
        }
        else  
      return false;
}

function check1()
{
var ret = true;
bool = 0
emailvalue=document.subscribe.emailid.value;

if (chk_email(emailvalue) == false && bool == 0)
  {	   
  bool = 1;
  ret = false;
  alert("Please enter a vaild email address.");	   
  document.subscribe.emailid.value="";           
  document.subscribe.emailid.focus();	 
  }	

return ret;
}


function capital(cap)
{
	var rc = false;
	if (cap=='@' || cap=='.' || cap=='_' || cap=='-')
	rc = true;
	if (cap >= "A" && cap <= "Z")
	rc = true;
	return rc;
}

function small(sma)
{
	var rm = false;
	if (sma=='@' || sma=='.' || sma=='_' || sma=='-')
	rm = true;
	if (sma >= "a" && sma <= "z")
	rm = true;
	return rm;
}

function numeric(num)
{
	var rn = false;
	if (num=='@' || num=='.' || num=='_' || num=='-')
	rn = true;
	if (num >= "0" && num <= "9")
	rn = true;
	return rn;
}

function chk_ascii(x)
{
	if (capital(x)==true || small(x)==true || numeric(x)==true)
	return true;
	else
	return false;
}

function chk_email(email)
{
     var temp = "" + email;
     var m = temp.length;
     var i = 0;
     var n = 0;
     var j = false;
     var k =false;
     var ret = false;
     if (temp.charAt(0)!='-' && temp.charAt(0)!='_'&& temp.charAt(m-1)!='-' && temp.charAt(m-1)!='_')
     {
     while (i < temp.length )
     {
             if (temp.charAt(i)!='@' && temp.charAt(i)!='.')
             {
             if ((temp.charAt(i)==' ')||(chk_ascii(temp.charAt(i))==false))
             {
             j = true;
             break;
             }
             }
             i ++;
     }
if ((temp.indexOf('@')>0) && (temp.indexOf('.')>0) && (temp.lastIndexOf('.') > temp.indexOf('@')))
{
if (((temp.indexOf('@')==temp.lastIndexOf('@')) && temp.charAt(0)!='@' && temp.charAt(m-1)!='@' && temp.charAt(0)!='.' && temp.charAt(m-1)!='.' && j==false))
ret = true;
else
{
ret = false;
}
}
else
{
ret = false;
}
}
else
{
ret = false;
}
return ret;
}

//this is the javascript added on 15th Oct 2009 by mayur for populating the Tooltip text 
// wz_tooltip.js is used to get actual Tooltip text box
// this function in turn will call to Tip() function of wz_tooltip.js 
function ShotTip(argText1, argText2, argShowTitle, argWidth)
{
	//alert(argShowTitle)
	if(argShowTitle=="false")	//do not show the titlebar
	{
		//Tip(argText1, SHADOW, false, STICKY, 1, CLOSEBTN, false, CLICKCLOSE, false, PADDING, 2, BGCOLOR, '#ffffff');
		Tip(argText1, WIDTH, argWidth, SHADOW, false, STICKY, 1, PADDING, 2, BGCOLOR, '#ffffff');

		//WIDTH, 150, PADDING, 6, BGCOLOR, '#ffffff'
	}
	else
	{
		Tip(argText1, TITLE, argText2, WIDTH, argWidth, SHADOW, false, STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true, PADDING, 6, BGCOLOR, '#ffffff');
	}
}
//this is the javascript added on 20th Aug 2009 by mayur for populating the Tooltip text 

