//*******************************************
//FULLSCREEN POPUP
//*******************************************
function OpenFullWindow(targeturl){
	window.open(targeturl,"","fullscreen")
}

//*******************************************
//POP-UP WINDOW
//*******************************************
function OpenBrWindow(theURL,winName,features) {
	Window = window.open(theURL,winName,features);
}

function checkLength(which){
	document.getElementById("lblCommentLen").innerHTML = "Total Length: " + which.value.length;
	if(which.value.length > which.limit-1) {
		return false;
	}else{
		return true;
	}
}

function Confirmation(str){
	return confirm(str);
}

function ToggleClass(obj,e,off,on){
	obj.className = (e == "over") ? on : off;
}

var currentSize = 13;


function fontIncr(){
	var obj = document.getElementById("divContentBody");
	var services = document.getElementById("divServicesShell");
	var blog = document.getElementById("_ctl2_divBody");

	currentSize = currentSize+1;

	if(blog != null)
		blog.style.fontSize = currentSize + "px"
	else if(services != null)
		services.style.fontSize = currentSize + "px"
	else
		obj.style.fontSize = currentSize + "px"
}

function fontDecr(){
	var obj = document.getElementById("divContentBody");
	var services = document.getElementById("divServicesShell");
	var blog = document.getElementById("_ctl2_divBody");

	currentSize = currentSize-1;

	if(blog != null)
		blog.style.fontSize = currentSize + "px"
	else if(services != null)
		services.style.fontSize = currentSize + "px"
	else
		obj.style.fontSize = currentSize + "px"
}

function popUpPrint(strTITLE) {
	var obj = document.getElementById("divContentBody");
	var services = document.getElementById("divServicesShell");
	var blog = document.getElementById("_ctl2_divBody");
	var strHTML = "";

	if(blog != null)
		strHTML = blog.innerHTML;
	else
		strHTML = obj.innerHTML;

	var html = "";
	html += "<HTML>\n";
	html += "<HEAD>\n";
	html += "<TITLE>" + strTITLE + "</TITLE>\n";
	html += "<link href=\"css/General.css\" type=\"text/css\" rel=\"stylesheet\">\n";
	html += "</HEAD>\n";
	html += strHTML;
	html += "</BODY>\n";
	html += "</HTML>\n";

	popup=window.open('','image','top=20,left=20,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close()
}

function blogNav(nPageNo)
{
    var oPage = document.getElementById('pageno');
    oPage.value = nPageNo;
    document.getElementById('blognav').submit;
}

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

function getObj(m)
{
    if (isNS4) {
        elm = document.layers[m];
    } else if (isIE4) {
        elm = document.all[m];
    } else if (isIE5 || isNS6) {
        elm = document.getElementById(m);
    }
    return elm;
}

//Form error handling
function displayDesc(strmsg)
{
    helpWnd = window.open('','','top=150,left=150,width=500,height=450');
    if (!helpWnd.opener) helpWnd.opener = self;
    with (helpWnd.document)
    {
        write('<html>\n');
        write('<head><title>Form Help</title></head>\n');
        write('<body>\n');
        write('<table border="0" height="100%" width="100%">\n<tr><td valign="top">\n');
        write('<p style="font-weight: bold">Listed below is a list of errors that were encountered while processing your form</p>\n');
        write(strmsg);
        write('\n<br><br>\n');
        write('\n</td></tr><tr><td VALIGN="BOTTOM">\n');
        write('<hr />\n');
        write('click <a href="javascript:window.close();">here</a> to close this window\n');
        write('</td></tr>\n</table>\n');
        write('</body>\n</html>\n');
    }
}