var sspeed = 10;
var stime = 15;
function kNav(id,d){
var h = document.getElementById(id + '-mhead');
var c = document.getElementById(id + '-mcontent');
clearInterval(c.timer);
if(d == 1){
clearTimeout(h.timer);
if(c.maxh && c.maxh <= c.offsetHeight){return}
else if(!c.maxh){
c.style.display = 'block';
c.style.height = 'auto';
c.maxh = c.offsetHeight;
c.style.height = '0px';
}
c.timer = setInterval(function(){kSlide(c,1)},stime);
}else{
h.timer = setTimeout(function(){kCollapse(c)},50);
}
}
function kCollapse(c){
c.timer = setInterval(function(){kSlide(c,-1)},stime);
}
function cancelIt(id){
var h = document.getElementById(id + '-mhead');
var c = document.getElementById(id + '-mcontent');
clearTimeout(h.timer);
clearInterval(c.timer);
if(c.offsetHeight < c.maxh){
c.timer = setInterval(function(){kSlide(c,1)},stime);
}
}
function kSlide(c,d){
var currh = c.offsetHeight;
var dist;
if(d == 1){
dist = (Math.round((c.maxh - currh) / sspeed));
}else{
dist = (Math.round(currh / sspeed));
}
if(dist <= 1 && d == 1){
dist = 1;
}
c.style.height = currh + (dist * d) + 'px';
c.style.opacity = currh / c.maxh;
c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')';
if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){
clearInterval(c.timer);
}
}
function mainema(men) {
	var full1 = men + '@' + 'oakessurveys' + '.' + 'com';
	document.write('<a href="' + 'mail' + 'to:' + full1 + '?subject=Website%20Enquiry" title="Click To Email Us">' + full1 + '</a>')
}
function regema(meo) {
	var full1 = meo + '@' + 'oakessurveys' + '.' + 'com';
	document.write('<a href="' + 'mail' + 'to:' + full1 + '?subject=Website%20Enquiry" title="Click To Send An Email">' + full1 + '</a>')
}
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName('a'); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute('href') && 
       anchor.getAttribute('rel') == 'external') 
     anchor.target = '_blank'; 
 }
}
function sto() {
setTimeout ( "loadFlashNews()", 5000 );
}
function loadFlashNews() {
var csdn = document.getElementById("csdnews");
csdn.getNews();
}