function ShowElement(Element)
{
	Id = document.getElementById(Element);
	Id.style.display='';
}

function HideElement(Element)
{
	Id = document.getElementById(Element);
	Id.style.display='none';
}

function checkEmail(EmailAddress) 
{
	//var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	
	if (!filter.test(EmailAddress)) 
	{
		return false;
	}
	return true;
}


function checkMobile(MobileNumber)
{
	if(isNaN(MobileNumber))
	{
		return false;
	}
	else if(MobileNumber.length != 10)
	{
		return false;
	}
	else if(!(MobileNumber.charAt(0) == '9' || MobileNumber.charAt(0) == '8' || MobileNumber.charAt(0) == '7'))
	{
		return false;
	}

	return true;
}

function DeleteRecord(DelUrl,Message)
{
	//alert("del url = "+DelUrl);

	if(confirm(Message))
	{
		
		//window.open(DelUrl,"mywindow","location=0,status=0,resizable=0,toolbar=0,scrollbars=1,width=900,height=500");
		window.location.href = DelUrl;
		return true;
	}

	return false;
}



function textCounter1(field,cntfield,maxlimit) //This is for calculating 2 chars for new lines...stopped for now...Rituraj 11/17/2010
{	
	cntfield = typeof(cntfield) != "undefined" ? cntfield : 'remLen1';
	
	var fieldc = document.getElementById(cntfield);

	if(cntfield == "txtCountDisp")
	{
		fieldc = document.getElementById("txtCountDisp");
	}

	cntfield = fieldc;

	var NewLinesArr	=	new Array();

	var FieldLength	=	field.value.length;

	NewLinesArr		=	field.value.split("\n");

	
	if((NewLinesArr.length -1) > 0)
	{
		//alert("new lines arr length = "+NewLinesArr.length);
		FieldLength	=	field.value.length + (NewLinesArr.length - 1);
	}

	//var FieldLength	=	((NewLinesArr.length * 2)+field.value.length) - 1;

	var DeductChar		=	maxlimit-((FieldLength-field.value.length + 2));

	//var SubStrVal		=	field.value.substring(0, DeductChar);

	var SubStrVal		=	field.value.substring(0,DeductChar);

	
	if (FieldLength > maxlimit) // if too long...trim it!
	{

		//field.value = field.value.substring(0, (maxlimit-4));
		//field.value = field.value.substring(0, DeductChar);
		field.value = SubStrVal;

		//alert(" substrval "+SubStrVal);
		
		//alert("you can only use "+maxlimit+" characters in one SMS, fieldvalue = "+field.value);
		alert("you can only use "+maxlimit+" characters in one SMS");
		cntfield.innerHTML = (maxlimit - FieldLength) > 0?(maxlimit - FieldLength):0;
		return false;
	}
	else// otherwise, update \'characters left\' counter
	{
		//cntfield.value = maxlimit - field.value.length;
		if(field.value != "Enter Your SMS here..")
		{
			//cntfield.innerHTML = (maxlimit - field.value.length);
			cntfield.innerHTML = maxlimit - FieldLength;
			//cntfield.innerHTML = "new lines arr length = "+NewLinesArr.length;
		}
	}
}

/*function textCounter1(field,cntfield,maxlimit)//This is for calculating new lines as a single character...Rituraj 11/17/2010
{	
	cntfield = typeof(cntfield) != "undefined" ? cntfield : 'remLen1';
	
	var fieldc = document.getElementById(cntfield);

	if(cntfield == "txtCountDisp")
	{
		fieldc = document.getElementById("txtCountDisp");
	}

	cntfield = fieldc;

	
	var FieldLength	=	field.value.length;
	
	
	if (FieldLength > maxlimit) // if too long...trim it!
	{
		field.value = field.value.substring(0, (maxlimit-2));

		alert("you can only use "+maxlimit+" characters in one SMS");
		cntfield.innerHTML = (maxlimit - FieldLength) > 0?(maxlimit - FieldLength):0;
		return false;
	}
	else// otherwise, update \'characters left\' counter
	{
		//cntfield.value = maxlimit - field.value.length;
		if(field.value != "Enter Your SMS here..")
		{
			//cntfield.innerHTML = (maxlimit - field.value.length);
			cntfield.innerHTML = maxlimit - FieldLength;
			//cntfield.innerHTML = "new lines arr length = "+NewLinesArr.length;
		}
	}
}*/

function setradio(obj,chkval)
{
	for (i = 0; i < obj.length; i++)
	{
		rval = obj[i].value;

		if (rval == chkval)
		{
			obj[i].checked=true;
		}
	}
}

function setval(obj,chkval)
{
	for (i = 0; i < obj.length; i++)
	{
		if (obj.options[i].value == chkval)
		{
			obj.selectedIndex=i;
		}
	}
}

function setval1(obj,chkval)
{
	for (i = 0; i < obj.length; i++)
	{
		if (obj.options[i].value == chkval)
		{
			obj.options[i].selected = "selected";
		}
	}
}


function AddTextToInputField(FieldId,TextValue)
{
	var Field = document.getElementById(FieldId);

	/*if(Field.value != '')
	{
		Field.value = TextValue+Field.value;
	}
	else
	{
		Field.value = TextValue;
	}*/

	if(Field.value == '')
	{
		Field.value = TextValue;
		Field.focus();
	}
}

function SendToAjax(Url,AjxPanel)
{
	CallAjax(Url,AjxPanel,true);
}

function checkSelection(theControl,chkInitial,theMessage)
{
	var n=document.getElementsByName(theControl).length;
	var ischecked=false;
	for(var i=0;i<n;i++)
	{
	    var chk=document.getElementById(chkInitial+(i+1));
		if(chk.checked)
        {
            ischecked=true;			
        }    
	}
	if(ischecked==false)
	{
	    alert("Please select atleast one "+theMessage);		
        return false;
	}		
}

/*function FillValueOnBlur(FieldId,FieldValue)
{
	var Fid = document.getElementById(FieldId);

	if(Fid.value == "")
	{
		Fid.value = FieldValue;
	}
	
}*/

function FillValueOnBlur(FieldId,FieldValue,AjaxUrl,AjaxDivIdVal)
{
	var Fid = document.getElementById(FieldId);

	if(Fid.value == "")
	{
		Fid.value = FieldValue;
	}
	else
	{

		//AjaxUrl			= typeof(AjaxUrl) != 'undefined'?AjaxUrl+"?MobileNo="+Fid.value:"";

		AjaxUrl			= typeof(AjaxUrl) != 'undefined'?AjaxUrl:"";

		AjaxDivIdVal	= typeof(AjaxDivIdVal) != 'undefined'?AjaxDivIdVal:"";

		if(AjaxUrl != "")
		{
			CallAjax(AjaxUrl,AjaxDivIdVal,true);
		}
	}
	
}


function FillValueOnFocus(FieldId,FieldValue)
{
	//alert("Called");
	var Fid = document.getElementById(FieldId);

	if(Fid.value == FieldValue)
	{
		Fid.value = "";
	}
}

function FillValueInField(FieldValue,FieldId)
{
	//alert("Fill value called");
	var Fid = document.getElementById(FieldId);

	//alert("Field Id = "+Fid+",Value = "+FieldValue);

	if(FieldValue != "")
	{
		//Fid.value = FieldValue;
		//alert("Field value before replace : "+FieldValue);
		FieldValue	=	FieldValue.replace('\\','');	
		Fid.value	=	br2nl(FieldValue);
		Fid.focus();
		//alert("Field value after replace : "+FieldValue);
	}
}

function disableEnterKey(e)
{
	 var key;
	 if(window.event)
		  key = window.event.keyCode;     //IE
	 else
		  key = e.which;     //firefox
	 if(key == 13)
		  return false;
	 else
		  return true;
}


function disableSpaceBar(e)
{
	 var key;
	 if(window.event)
		  key = window.event.keyCode;     //IE
	 else
		  key = e.which;     //firefox
	 if(key == 32)
		  return false;
	 else
		  return true;
}

function disableEnterAndSpaceBarKey(e)
{
	 var key;
	 if(window.event)
		  key = window.event.keyCode;     //IE
	 else
		  key = e.which;     //firefox

	 //alert(key);

	 //if(key == 32 || key == 13)
	 if(key == 32 || key == 13 || key == 44)
		  return false;
	 else
		  return true;
}


function GetInputFromJavascript(Question,DefaultValue,UrlToSubmit,VarQueryString)
{
	var Value = prompt(Question,DefaultValue);

	if(Value != '' && Value != null)
	{
		//window.location.href = UrlToSubmit+"?"+VarQueryString+"="+Value;

		setTimeout(function()
		{
			window.location = UrlToSubmit+"?"+VarQueryString+"="+Value;
		}, 0);
	}

	return true;
}

function RenameGroup(Question,DefaultValue,UrlToSubmit,VarQueryString,VarQueryString2)
{
	var Value = prompt(Question,DefaultValue);

	if(Value != '' && Value != null)
	{
		//window.location.href = UrlToSubmit+"?"+VarQueryString+"="+Value;

		setTimeout(function()
		{	//This function written as window.location.href is not working in IE 6...Rituraj 5/17/2010
			window.location = UrlToSubmit+"?"+VarQueryString+"="+Value+"&Gid="+VarQueryString2;
		}, 0);
	}

	return true;
}

function stristr (haystack, needle, bool) 
{
    // Finds first occurrence of a string within another, case insensitive  
    // 
    // version: 1006.1915
    // discuss at: http://phpjs.org/functions/stristr    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfxied by: Onno Marsman
    // *     example 1: stristr('Kevin van Zonneveld', 'Van');
    // *     returns 1: 'van Zonneveld'
    // *     example 2: stristr('Kevin van Zonneveld', 'VAN', true);    // *     returns 2: 'Kevin '
    var pos = 0;
 
    haystack += '';

    pos = haystack.toLowerCase().indexOf( (needle+'').toLowerCase() );    if (pos == -1)
	{
        return false;
    }
	else
	{
        if (bool) 
		{
            return haystack.substr( 0, pos );        
		} 
		else
		{
            return haystack.slice( pos );
        }
    }
}

function explode (delimiter, string, limit) 
{
    // Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned.  
    // 
    // version: 1006.1915
    // discuss at: http://phpjs.org/functions/explode    // +     original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: kenneth
    // +     improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: d3x
    // +     bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)    // *     example 1: explode(' ', 'Kevin van Zonneveld');
    // *     returns 1: {0: 'Kevin', 1: 'van', 2: 'Zonneveld'}
    // *     example 2: explode('=', 'a=bc=d', 2);
    // *     returns 2: ['a', 'bc=d']
     var emptyArray = { 0: '' };
    
    // third argument is not required
    if ( arguments.length < 2 ||
        typeof arguments[0] == 'undefined' ||        typeof arguments[1] == 'undefined' ) {
        return null;
    }
 
    if ( delimiter === '' ||        delimiter === false ||
        delimiter === null ) {
        return false;
    }
     if ( typeof delimiter == 'function' ||
        typeof delimiter == 'object' ||
        typeof string == 'function' ||
        typeof string == 'object' ) {
        return emptyArray;    }
 
    if ( delimiter === true ) 
	{
        delimiter = '1';
    }
	
    if (!limit) 
	{
        return string.toString().split(delimiter.toString());
    }
	else 
	{
        // support for limit argument        var splitted = string.toString().split(delimiter.toString());
        var partA = splitted.splice(0, limit - 1);
        var partB = splitted.join(delimiter.toString());
        partA.push(partB);
        return partA;    
	}
}

function str_ireplace ( search, replace, subject ) 
{
    // Replaces all occurrences of search in haystack with replace / case-insensitive  
    // 
    // version: 1006.1915
    // discuss at: http://phpjs.org/functions/str_ireplace    // +   original by: Martijn Wieringa
    // +      input by: penutbutterjelly
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +    tweaked by: Jack
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)    // +   bugfixed by: Onno Marsman
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Philipp Lenssen
    // *     example 1: str_ireplace('l', 'l', 'HeLLo');    // *     returns 1: 'Hello'
    // *     example 2: str_ireplace('$', 'foo', '$bar');
    // *     returns 2: 'foobar'
    var i, k = '';
    var searchl = 0;    var reg;
 
    var escapeRegex = function(s) 
	{
        return s.replace(/([\\\^\$*+\[\]?{}.=!:(|)])/g, '\\$1');
    }; 

    search += '';
    searchl = search.length;
    if (!(replace instanceof Array)) {
        replace = [replace];        if (search instanceof Array) {
            // If search is an array and replace is a string,
            // then this replacement string is used for every value of search
            while (searchl > replace.length) {
                replace[replace.length] = replace[0];            }
        }
    }
 
    if (!(search instanceof Array)) {        search = [search];
    }

    while (search.length>replace.length) 
	{
        // If replace has fewer values than search,
        // then an empty string is used for the rest of replacement values        replace[replace.length] = '';
    }
 
    if (subject instanceof Array) 
	{
        // If subject is an array, then the search and replace is performed        // with every entry of subject , and the return value is an array as well.
        for (k in subject) {
            if (subject.hasOwnProperty(k)) {
                subject[k] = str_ireplace(search, replace, subject[k]);
            }        }
        return subject;
    }
 
    searchl = search.length;    for (i = 0; i < searchl; i++) 
	{
        reg = new RegExp(escapeRegex(search[i]), 'gi');
        subject = subject.replace(reg, replace[i]);
    }
     return subject;
}

function GetSelectedIndexOfValue(SelectBox,Val)
{
	var Id	=	document.getElementById(SelectBox);

	var i	=	0;

	var	Opt	=	Array();

	Opt		=	Id.options;

	//for (i in Opt)//This line not working on google chrome...Rituraj 6/25/2010
	for(i=0;i<Opt.length;i++)
	{
	  if(Val == Opt[i].value)
	  {
			//alert("Text for value "+Val+" = "+Opt[i].text);
			return i;
	  }
	}
}

/**********************From here functions for handling cookies through Javascript...Rituraj 6/30/2010******************/

function Set_Cookie( name, value, expires, path, domain, secure )
{
	//alert("Set cookie called");
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );

	/*
	if the expires variable is set, make the correct
	expires time, the current script below will set
	it for x number of days, to make it for hours,
	delete * 24, for minutes, delete * 60 * 24
	*/
	if ( expires )
	{
		expires = expires * 1000 * 60 * 60 * 24;
	}

	var expires_date = new Date( today.getTime() + (expires) );

	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
	( ( path ) ? ";path=" + path : "" ) +
	( ( domain ) ? ";domain=" + domain : "" ) +
	( ( secure ) ? ";secure" : "" );

	return true;

	//alert("set cookie = "+document.cookie);
}

function Get_Cookie( check_name ) 
{
	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';

	var b_cookie_found = false; // set boolean t/f default f

	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );


		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');

		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}

	if ( !b_cookie_found )
	{
		return null;
	}
}


function Delete_Cookie( name, path, domain ) 
{
	if ( Get_Cookie( name ) ) document.cookie = name + "=" +
	( ( path ) ? ";path=" + path : "") +
	( ( domain ) ? ";domain=" + domain : "" ) +
	";expires=Thu, 01-Jan-1970 00:00:01 GMT";

	return true;
}

/*********************Till here functions for handling cookies through Javascript...Rituraj 6/30/2010********************/

function CheckMobNoBoxOnLoad(FieldId)
{
	//alert("Called CheckMobNoBoxOnLoad");

	var Field		=	document.getElementById(FieldId);

	var MobNos		=	Field.value.split(',');

	var	i			=	0;

	var CheckBox	=	"";

	for(i=0;i<MobNos.length;i++)
	{
		//alert("value of contactidsarray = "+ContactIdsArray[MobNos[i]]);

		if(ContactIdsArray[MobNos[i]] != undefined)
		{
			CheckBox			=	document.getElementById(ContactIdsArray[MobNos[i]]);
			CheckBox.checked	=	true;
		}
	}
}

function CheckAll(ChecboxNameStart)
{
	//alert("Called");
	var Length = document.getElementById("NoOfBoxes").value;

	var i = 1;

	var chk = "";

	for(i=0;i<Length;i++)
	{
		chk = document.getElementById(ChecboxNameStart+i);
		chk.checked = true;
	}		
}

function UnCheckAll(ChecboxNameStart)
{
	//alert("Called");
	var Length = document.getElementById("NoOfBoxes").value;

	var i = 1;

	var chk = "";

	for(i=0;i<Length;i++)
	{
		chk = document.getElementById(ChecboxNameStart+i);
		chk.checked = false;
	}		
}

function CheckBoxCheckUnCheck(ChkBox,ChecboxNameStart)
{

	var Length = document.getElementById("NoOfBoxes").value;

	var i = 1;

	var chk = "";

	for(i=0;i<Length;i++)
	{
		chk = document.getElementById(ChecboxNameStart+i);
		
		if(ChkBox.checked == true)
		{
			chk.checked = true;
		}
		else
		{	
			chk.checked = false;
		}
	}		

}

function ChangeImageSource(ImageId,Src,EtemplateFieldId,Value)
{
	var Img	= document.getElementById(ImageId);

	if(Img != undefined)
	{
		document.getElementById(EtemplateFieldId).value	=	Value;

		Img.src = Src;
		//Img.focus();

		var ATag	=	document.getElementById('ETemplateImgAnchor');
		
		ATag.focus();
	}
}

function in_array(needle, haystack) //PHP equivalent of javascript...Rituraj 12/16/2010
{
    var length = haystack.length;
    
	for(var i = 0; i < length; i++) 
	{
        if(haystack[i] == needle) return true;
    }

    return false;
}

function RestrictChars(Ele,MaxLength)
{
	//alert("Called,Ele = "+Ele);
	if(Ele.value.length > MaxLength)
	{
		Ele.value = Ele.value.substring(0, (MaxLength));
	}
}

function br2nl(Str)
{
	return Str.replace( /\<br(\s*\/|)\>/g,'\r\n' );
}


/*function get_radio_value(FormName,RadioName)
{
		
		for (var i=0; i < document.orderform.music.length; i++)
		{
			if (document.orderform.music[i].checked)
			{
				var rad_val = document.orderform.music[i].value;
			}
		}
}*/

/******************From here Functions for calculation difference between two days...Rituraj 8/19/2011******************************/

	function isValidDate(s) 
	{
		//alert("IsValiddAte called");
		// format D(D)/M(M)/(YY)YY
		var dateFormat = /^\d{1,4}[\.|\/|-]\d{1,2}[\.|\/|-]\d{1,4}$/;

		if (dateFormat.test(s)) 
		{
			// remove any leading zeros from date values
			s = s.replace(/0*(\d*)/gi,"$1");
			var dateArray = s.split(/[\.|\/|-]/);
		  
			// correct month value
			dateArray[1] = dateArray[1]-1;

			// correct year value
			if (dateArray[2].length<4) 
			{
				// correct year value
				dateArray[2] = (parseInt(dateArray[2]) < 50) ? 2000 + parseInt(dateArray[2]) : 1900 + parseInt(dateArray[2]);
			}

			var testDate = new Date(dateArray[2], dateArray[1], dateArray[0]);
			
			if (testDate.getDate()!=dateArray[0] || testDate.getMonth()!=dateArray[1] || testDate.getFullYear()!=dateArray[2]) 
			{
				return false;
			} 
			else 
			{
				return true;
			}
		}
		else 
		{
			return false;
		}
	}

	function DateDiffDays(Date1,Date2)
	{
		//alert("Datediff called");

		if(!isValidDate(Date1))
		{
			alert("Invalid Start Date");
			return false;
		}

		if(!isValidDate(Date2))
		{
			alert("Invalid End Date");
			return false;
		}

			
		var DateArr1	=	Date1.split("/");

		var DateArr2	=	Date2.split("/");

		var one_day		=	1000*60*60*24; 

		//alert("DateArr1 = "+DateArr1+",DateArr2 = "+DateArr2);
		
		Date1			=	new Date(DateArr1[2],(DateArr1[1]-1),DateArr1[0]);
  
        Date2			=	new Date(DateArr2[2],(DateArr2[1]-1),DateArr2[0]);

		//alert("Dateobject 1 = "+Date1+", Dateobject 2 = "+Date2);

		if(Date2.getTime() > Date1.getTime())
		{
			return Math.ceil((Date2.getTime()- Date1.getTime())/one_day);
		}
		else
		{
			return Math.ceil((Date1.getTime()- Date2.getTime())/one_day);
		}
	}

	function DateDiffYears(Date1,Date2)
	{
		if(!isValidDate(Date1))
		{
			alert("Invalid Start Date");
			return false;
		}

		if(!isValidDate(Date2))
		{
			alert("Invalid End Date");
			return false;
		}

		var Diff	=	DateDiffDays(Date1,Date2);	

		return Math.ceil(Diff/365);
	}

/******************Till here Functions for calculation difference between two days...Rituraj 8/19/2011******************************/

/****************From here script for new main menu...Rituraj 9/1/2011******************/

var imainmenu=0;
var strmainmenu;
var bol1mainmenu=false;

function selectmenu(dv)
{
	
	
	imainmenu++;

	//alert("Sel menu called, dv = "+dv+", imainmenu = "+imainmenu);
	
	document.getElementById("menu1").style.display='none';
	document.getElementById("menu2").style.display='none';
	document.getElementById("menu3").style.display='none';
	document.getElementById("menu4").style.display='none';
	document.getElementById("menu5").style.display='none';
	
	if(imainmenu%2==1) 
	{
		strmainmenu=dv;
		document.getElementById (dv).style.display='block';
	}
	
	if(imainmenu%2==0) 
	{
		document.getElementById (dv).style.display='block';
		document.getElementById(strmainmenu).style.display='none';
	}

}

/****************Till here script for new main menu...Rituraj 9/1/2011******************/

function SleepJs(delay)
{
    var start = new Date().getTime();
    while (new Date().getTime() < start + delay);
}

function revealModal(divID)
{
	window.onscroll = function () { document.getElementById(divID).style.top = document.body.scrollTop; };
    document.getElementById(divID).style.display = "block";
    document.getElementById(divID).style.top = document.body.scrollTop;
	
	var	divWidth 	= 	450;		
	var	shiftLeft 	= 	-225;
	var	divHeight 	= 	240; 
	var	shiftTop 	= 	-120;
		
	if(navigator.userAgent.indexOf("MSIE") != -1)
	{
		divHeight 	= 	divHeight+40; 
		shiftTop 	= 	shiftTop-20;		
	}
	
	document.getElementById("divModal").style.width = divWidth+"px";		
	document.getElementById("divModal").style.left = shiftLeft+"px";	
	document.getElementById("divModal").style.height = divHeight+"px";
	document.getElementById("divModal").style.top = shiftTop+"px";  
	
	return false;     
}

function hideModal(divID)
{
	if(navigator.userAgent.indexOf("MSIE") != -1) 
	{
		document.body.scroll = "yes";	// ie only
	}
	else
	{
		document.documentElement.style.overflow = "visible";	 // firefox, chrome
	}
    //var divID='modalPage';
	document.getElementById(divID).style.display = "none";
	return false;
}

