function popup(loc)
{
	var w = window.open(loc,"Veodia","status=1,resizable=1,width=750,height=600,scrollbars=1"); 
	w.focus();
}

function addFooter()
{
  	document.getElementById('footer').innerHTML = "<a href=\"#null\" onClick=\"popup('terms.html');\">Terms & Conditions</a> | <a href=\"#null\" onClick=\"popup('policy.html');\">Privacy Policy</a> | <a href=\"#null\" onClick=\"popup('help.php');\">Help</a> | <a href=\"mailto:feedback@veodia.com\" >Send Feedback</a>";
}

function addFooterPortalPreview()
{
  	document.getElementById('footer').innerHTML = "<a href=\"#null\" onClick=\"popup('terms.html');\">Terms & Conditions</a> | <a href=\"#null\" onClick=\"popup('policy.html');\">Privacy Policy</a>";
}

function addFooterMarketing()
{
    var uriParts = document.location.href.split("/",4);
    var webappRoot =  uriParts[2] + "/" + uriParts[3] + "/";
    //var webappRoot =  uriParts[2]+"/";
  	document.getElementById('footer').innerHTML = "<a href=\"#null\" onClick=\"popup('http://"+webappRoot+"terms.html');\">Terms & Conditions</a> | <a href=\"#null\" onClick=\"popup('http://"+webappRoot+"policy.html');\">Privacy Policy</a> | <a href=\"http://"+webappRoot+"contact.php\">Contact Us</a> | <a href=\"http://"+webappRoot+"signup.php\">Sign Up Now</a>";
}

function setClass(itemName,className){
	if(document.getElementById(itemName)){
		document.getElementById(itemName).className = className;
	}
}

function addPrefix(itemName,prefix)
{
	if(document.getElementById(itemName).innerText){
		// IE
  		document.getElementById(itemName).innerHTML = prefix+"&nbsp;"+document.getElementById(itemName).innerText;
  	}else{
  		document.getElementById(itemName).innerHTML = prefix+"&nbsp;"+document.getElementById(itemName).text;
  	}
}

