function openWin(url,pop_name,prop)
{
	if((typeof url == 'undefined') || url == '')
	{
		alert('Invalid Properties');
		return;
	}
	if((typeof prop == "undefined") || prop == '') prop = 'height=420,width=500,left=0,top=0';
	if((typeof pop_name == "undefined") || pop_name == '') pop_name = 'newwin';

	var new_win = window.open(url, pop_name, prop);
	return new_win;
}

function OpenNewWin(urlText)
{
	win1=window.open(urlText,'dispwin','width=750,height=600,left=0,top=0,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no');
}

/* 
function postpage(status)
This function is used for checking the process of 'preview, add , update ' process in event module
*/
function postpage(status)
{
    if(status == '2')
    {
        document.forms[0].status.value="1";
        document.forms[0].action.value="publish";
    }
    else if(status == '3')
    {
        document.forms[0].status.value="1";
        document.forms[0].action.value="preview";
    }
    else if(status == '4')
    {
        document.forms[0].status.value="";
        document.forms[0].action.value="cancel";
    }  
    else if(status == '5')
    {
        document.forms[0].status.value="1";
        document.forms[0].action.value="back";
    }    
    document.forms[0].submit();
}  

/*
Function postme()
This function used for posting forms in opportinities modules.

*/

function postme(hid_status)
{
    if(hid_status == '2')
    {
        document.forms[0].hid_status.value="1";
        document.forms[0].hid_action.value="preview mode";
    }
    else if(hid_status == '1')
    {
        document.forms[0].hid_status.value="1";
        document.forms[0].hid_action.value="save";
    }
    else if(hid_status == '3')
    {
        document.forms[0].hid_status.value="1";
        document.forms[0].hid_action.value="update";
    }
    else if(hid_status == '4')
    {
        document.forms[0].hid_status.value="4";
        document.forms[0].hid_action.value="back";
    }
    else if(hid_status == '5')
    {
            document.forms[0].hid_status.value="1";
            document.forms[0].hid_action.value="savealumni";
    }
    
    
    document.forms[0].submit();
}
/*
Function search_oppr()
This function used for checking status of search . 
*/

function search_oppr()
{
        document.forms[0].status.value="1";
        document.forms[0].submit();
}
function add_20(txt_name,flag_name)
{
	num_rows = eval('document.forms[0].'+txt_name+'.value');
	num = parseInt(num_rows) + 20;
	eval('document.forms[0].'+txt_name+'.value='+num);
	eval('document.forms[0].'+flag_name+'.value='+num_rows);
	eval('document.forms[0].hid_refresh.value="1"');
	//document.forms[0].hid_refresh.value = "1";
	document.forms[0].submit();
}

function processForm(n)
{
    if(document.forms[0].editor_mode.checked)
    {
    	content = frames ['composeEditor'].document.body.innerText;
    }
    else
    {
    	content = frames ['composeEditor'].document.body.innerHTML;
    }
    
    document.forms[0].txt_content.value = content; 
    
    document.forms[0].hid_status.value = n; 
    document.forms[0].submit();
}

function setPointer(theCell, theMarkColor)
{
    theCell.style.backgroundColor = theMarkColor;
    return true;
}

function go(url)
{
	window.location = url;
	return false;
}
//-------------------------------------------------------------------------------

   function fadeIn(i,j,fadeObject){
              document.getElementById(fadeObject).style.MozOpacity=1;
              document.getElementById(fadeObject).filters.alpha.opacity=i;
              //i++;
              i+=10;

              if (i<j) setTimeout("fadeIn("+i+","+j+",'"+fadeObject+"')",0);
          }

   function fadeOut(i,j,fadeObject){
              document.getElementById(fadeObject).style.MozOpacity=0.5;
              document[fadeObject].filters.alpha.opacity=i;
              //i--;
              i-=10;

              if (i>j) setTimeout("fadeOut("+i+","+j+",'"+fadeObject+"')", 0);
          }
          

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];}
}