function sendStatisticPage(oid,linkType,statisticTag,anchorObject) {
	if (typeof(instadiaId)!='undefined') {
		try {
			Instadia_sendInfo(instadiaId,instadiaDesc);
		} catch ( instadiaError ) {}		
	}
}

function csspopup() {
	if(document.getElementById){
		SetCookie('DCsurvey', 0, expiry);
		document.getElementById("popup").style.display="none"; 
		return false; 
	}
	else 
		return true; 
}

function doBeforeLoad(){
	try {
		sendStatisticPage();
	} catch ( error ) {  }
	
	// RightMargin deletEmptyDivs (all Browsers)
	var divwithclass=document.getElementsByTagName("DIV");
	var divcounter;
	for(divcounter=0;divcounter<divwithclass.length;divcounter++){
		if((divwithclass[divcounter].className=="margin") || (divwithclass[divcounter].className=="marginNav") || (divwithclass[divcounter].className=="fcrc")){
			if(divwithclass[divcounter].childNodes.length==0){
				var tr=divwithclass[divcounter].parentNode.parentNode;
				tr.style.display="none";
			}
		}
	}
	//End deletEmptyDivs
	
	// RightMargin fcImageFix 04-05-13  (all Browsers)
	function fcImageFix(freecomponent){
		var links=freecomponent.getElementsByTagName("A");
		var j;
		for(j=0;j<links.length;j++){
			if(links[j].getElementsByTagName("IMG").length>0){
				links[j].style.paddingLeft="0px";
			}
		}
	}
	
	var divs = document.getElementsByTagName("DIV");
	var i;
	for(i=0;i<divs.length;i++){
		if(divs[i].className=="fcrc"){
			fcImageFix(divs[i]);
		}
	}
	 //End fcImageFix

}


function doBeforeLoadSplash(){
	try {
		sendStatisticPage();
	} catch ( error ) {  }
}

function openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function openLinkInNewWindow(link){
  var winl = 10;
  var wint = 10;
  var w = screen.width - winl;
  var h = screen.height - wint;
  if (w > 800) w = 800;
  if (h > 600) h = 600;
  var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable=yes,location=yes,menubar=yes,status=yes,toolbar=yes';
  win = window.open(link, 'ext_link_win', winprops);
  //win.window.focus();
}

var today = new Date();
var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
	}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {
			return getCookieVal (j);
			}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
	return null;
	}

function DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
	}
