function copy()
{
document.thisonly.address2.value = document.thisonly.address1.value;
document.thisonly.city_town2.value = document.thisonly.city_town1.value;
document.thisonly.postal_code2.value = document.thisonly.postal_code1.value;
document.thisonly.region_id2.value = document.thisonly.region_id1.value;
}

function view_resume(m) {
var m
window.open ('report_applicant.php?m=+m+', 'view_resume', 
config='height=565, width=500, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=yes, directories=no, status=no, copyhistory=no')
}

function  js_poll(thispoll)
{
window.open('report_pollsurvey.php','newwinpoll','width=350,height=350,menubar=no,scrollbars=no,status=no');
return true;
}

function openWindow(url, name) {
window.name="BackToParent";
popupWin =window.open(url, name, "menubar=no,toolbar=no,location=no,resizable=no,dependent=yes,scrollbars,width=610,height=500,left=180,top=20,status=yes");
if(window.focus) {
popupWin.focus();
}
}

function disableForm(theform) {
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; i++) {
var tempobj = theform.elements[i];
if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
tempobj.disabled = true;
}
setTimeout('alert("Your form has been submitted.")', 3000);
return true;
}
else {
alert("The form has been submitted.");
return false;
}
}

function toForm() {
document.forms[0].elements[1].focus();
}

function setHomePage() {
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4up = (is_nav && (is_major >= 4));
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) && (agt.indexOf("msie 6")==-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
(agt.indexOf("windows 16-bit")!=-1));
var is_mac    = (agt.indexOf("mac")!=-1);

msg = "This functionality is not supported by your browser!"
if (is_win && is_ie4) {alert(msg);}
else if (is_mac && is_ie) {alert(msg);}
else if (is_win && is_ie5up) {
oHomePage.style.behavior='url(#default#homepage)';
oHomePage.setHomePage('http://www.tsinoy.com');
}
else if (is_win && is_nav6up) {alert(msg);}
else if (is_win && is_nav4up) {alert(msg);}
else if (is_mac && is_nav4up) {alert(msg);}
else {alert(msg);}
}
function openWindow(url, name) {
window.name="BackToParent";
popupWin =window.open(url, name, "menubar=no,toolbar=no,location=no,resizable=no,dependent=yes,scrollbars,width=610,height=440,left=180,top=20,status=yes");
if(window.focus) {
popupWin.focus();
}
}