﻿	function make_email(the_username,the_domain_hint){
		if (the_domain_hint == 'dotcom'){
			var the_domain = '@talkswitch.com';
		}
		document.write('<a href="mailto:' + the_username + the_domain + '">' + the_username + the_domain + '</a>');
	}
	
	function showMainBox() {
		if (navigator.appName == 'Microsoft Internet Explorer') {
			document.write("<div class='mainIEBox'>");
		} else {
			document.write("<div class='mainBox'>");
		}
	}

	function showTop() {
		if (navigator.appName == 'Microsoft Internet Explorer') {
			document.write("<div class='topIeBorder'><img src='/images/trans.gif' width='786' height='11' /></div>");
		} else {
			document.write("<div class='topBorder'><img src='/images/trans.gif' width='786' height='11' /></div>");
		}
	}

	function showBottom() {
		if (navigator.appName == 'Microsoft Internet Explorer') {
			document.write("<div class=''><img src='/images/border/bottom.png' width='786' height='14' /></div>");
		} else {
			document.write("<div class=''><img src='/images/border/bottom.png' /></div>");
		}
	}
		
	function make_email_on_text(the_username,the_domain_hint,the_text){
		if (the_domain_hint == 'dotcom'){
			var the_domain = '@talkswitch.com';
		}
		if (the_domain_hint == 'dotuk'){
			var the_domain = '@talkswitch.co.uk';
		}
		if (the_text == 'e-mail'){
			var NewText = '<nobr>e-mail</nobr>';
		}else{
			var NewText = the_text;
		}
		document.write('<a href="mailto:' + the_username + the_domain + '">' + NewText + '</a>');
	}
	
	function create_window(url,w,h,scrollbars) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=0,width='+w+',height='+h);");
	}
	
	function confirm_action(the_message,the_result) {
		var agree=confirm(the_message);
		if (agree) {
			document.location = the_result ;
		}
	}
	
	noticeLayerx = 350;
	noticeLayery = 200;
	function setVisible(obj,sLink,sMode)
	{
		obj = document.getElementById(obj);
		obj.style.visibility = sMode;
		document.getElementById('updateAnchor').href = "javascript:setVisible('noticeLayer','','hidden');document.location='" + sLink + "';";
		document.getElementById('noticeMaskLayer').style.visibility = sMode;
	}
	
	function placeIt(obj)
	{
		obj = document.getElementById(obj);
		if (document.documentElement)
		{
			theLeft = document.documentElement.scrollLeft;
			theTop = document.documentElement.scrollTop;
		}
		else if (document.body)
		{
			theLeft = document.body.scrollLeft;
			theTop = document.body.scrollTop;
		}
		theLeft += noticeLayerx;
		theTop += noticeLayery;
		obj.style.left = theLeft + 'px' ;
		obj.style.top = theTop + 'px' ;
		setTimeout("placeIt('noticeLayer')",500);
	}
	
	function zoomFix(){
	var s = '';

	s = s + 'index.aspx?zoom_query=';
    s = s + document.aspnetForm.zoom_query.value;
    s = s + '&zoom_per_page=';
    s = s + document.aspnetForm.zoom_per_page.options[document.aspnetForm.zoom_per_page.selectedIndex].text;
    s = s + '&zoom_and=';

    for (var i=0; i < document.aspnetForm.zoom_and.length; i++)
       {
       if (document.aspnetForm.zoom_and[i].checked)
          {
          var rad_val = document.aspnetForm.zoom_and[i].value;
          }
       }
       
    s = s + rad_val;
    s = s + '&zoom_sort=0';
    
	document.location = s;
	}
