// JavaScript Document
// Home Hint Show
function ShowHomeHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('HomeHint').style.display = 'block';
} 
else { 
if (document.layers) { // Netscape 4 
document.HomeHint.display = 'block';
} 
else { // IE 4 
document.all.HomeHint.style.display = 'block'; 
} 
} 
}

// Home Hint Hide
function HideHomeHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('HomeHint').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.HomeHint.display = 'none'; 
} 
else { // IE 4 
document.all.HomeHint.style.display = 'none'; 
} 
} 
}

// Corporate Hint Show
function ShowCorporateHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('CorporateHint').style.display = 'block';
} 
else { 
if (document.layers) { // Netscape 4 
document.CorporateHint.display = 'block';
} 
else { // IE 4 
document.all.CorporateHint.style.display = 'block';
} 
} 
}

// Corporate Hint Hide
function HideCorporateHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('CorporateHint').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.CorporateHint.display = 'none'; 
} 
else { // IE 4 
document.all.CorporateHint.style.display = 'none'; 
} 
} 
}

// Projects Hint Show
function ShowProjectsHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('ProjectsHint').style.display = 'block';
} 
else { 
if (document.layers) { // Netscape 4 
document.ProjectsHint.display = 'block';
} 
else { // IE 4 
document.all.ProjectsHint.style.display = 'block';
} 
} 
}

// Projects Hint Hide
function HideProjectsHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('ProjectsHint').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.ProjectsHint.display = 'none'; 
} 
else { // IE 4 
document.all.ProjectsHint.style.display = 'none'; 
} 
} 
}

// Nagpur Hint Show
function ShowNagpurHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('NagpurHint').style.display = 'block';
} 
else { 
if (document.layers) { // Netscape 4 
document.NagpurHint.display = 'block';
} 
else { // IE 4 
document.all.NagpurHint.style.display = 'block';
} 
} 
}

// Nagpur Hint Hide
function HideNagpurHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('NagpurHint').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.NagpurHint.display = 'none'; 
} 
else { // IE 4 
document.all.NagpurHint.style.display = 'none'; 
} 
} 
}

// Contacts Hint Show
function ShowContactsHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('ContactHint').style.display = 'block';
} 
else { 
if (document.layers) { // Netscape 4 
document.ContactHint.display = 'block';
} 
else { // IE 4 
document.all.ContactHint.style.display = 'block';
} 
} 
}

// Contacts Hint Hide
function HideContactsHint() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('ContactHint').style.display = 'none'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.ContactHint.display = 'none'; 
} 
else { // IE 4 
document.all.ContactHint.style.display = 'none'; 
} 
} 
}

<!-- // 
var urlAddress = "http://www.7heights.com";
var pageName = "Seven Heights";
function addToFavorites() { if (window.external) { window.external.AddFavorite(urlAddress,pageName) 
} else { alert("Sorry! Your browser doesn't support this function."); 
} } // -->


function comingsoon(){
	alert("This Feature is Coming Soon");
}



/*
Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<b><span id="'+theform.toString()+'" style="color:#1374e0;">'+thelimit+'</span></b> characters remaining on your input limit'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}


function LTrim(str)
{
var whitespace = new String(" \t\n\r");

var s = new String(str);
if (whitespace.indexOf(s.charAt(0)) != -1) 
{
var j=0, i = s.length;

while (j < i && whitespace.indexOf(s.charAt(j)) != -1)

j++;

s = s.substring(j, i);

}
return s;
}


function checkEmail()	// Function to check email address
{
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form.txtemail.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
    document.form.txtemail.value="";
    document.form.txtemail.focus();
    return false;
}
function checkform()

{

	if(document.form.name.value=="")
	{
		alert("Please enter your name");
		document.form.name.focus();
		return false;
	}
	
	if(document.form.comment.value=="")
	{
		alert("Please enter your comment");
		document.form.comment.focus();
		return false;
	}
	
return true;		
}

function FontAdjustShow(){
document.getElementById('FontAdjustDiv').style.display = 'block'; 
}
function FontAdjustHide(){
document.getElementById('FontAdjustDiv').style.display = 'none'; 
}