// -- open a window with a website
function openSite(url)
{
site = "http://" + url
my_window= window.open(site,"mywindow1","resizable=1,scrollbars=1,width=780,height=580"); 
}

// -- open a window with a graphic
function openSample(img)
{
st = '<html><body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0><IMG src=../images/';
end = '></body></html>';
// sample images must be 848 * 600
crm_homepage = st + img + end;
my_window= window.open ("","mywindow1","resizable=1,scrollbars=1,width=848,height=600"); 
my_window.document.write(crm_homepage);
my_window.moveTo(20,20);  
}

// -- open a window with a graphic
function openSample1000by700(img)
{
st = '<html><body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0><IMG src=../images/';
end = '></body></html>';
// sample images must be 1010 * 710
crm_homepage = st + img + end;
my_window= window.open ("","mywindow1","resizable=1,scrollbars=1,width=1010,height=710"); 
my_window.document.write(crm_homepage);
my_window.moveTo(20,20);  
}

// -- image swapping (image name must be same as filename, replacement must be '...over')
function Swap_Image(title,filetype)
{
imgpath = '../images/' + title + 'over.' + filetype
document.getElementById(title).src=imgpath;
}
function Swap_Image_Back(title,filetype)
{
imgpath = '../images/' + title + '.' + filetype
document.getElementById(title).src=imgpath;
}

// -- collapsible HTML blocks
function expandx(id)
{
var id1='ax' + id; var id2='bx' + id;var id3='cx' + id;
document.getElementById(id1).style.display='';
document.getElementById(id2).style.display='none';
document.getElementById(id3).style.display='';
}
function collapsex(id) 
{
var id1='ax' + id ; var id2='bx' + id ; var id3='cx' + id ;
document.getElementById(id1).style.display='none'; document.getElementById(id2).style.display='';
document.getElementById(id3).style.display='none';
}

// -- collapsible HTML blocks (v2)
function expand(id)
{var id1='a' + id;var id2='b' + id;var id3='c' + id; 
 document.getElementById(id1).style.display=''; 
 document.getElementById(id2).style.display='none';
 document.getElementById(id3).style.display='';}
function collapse(id)
{var id1='a' + id ;var id2='b' + id;var id3='c' + id ;
 document.getElementById(id1).style.display='none';
 document.getElementById(id2).style.display='';
 document.getElementById(id3).style.display='none';}


// -- submit freetrial form
function frmSubmit()
{
if (document.getElementById('name').value.length < 1){alert('Please enter your name');return false;}
if (document.getElementById('email').value.length < 1){alert('Please enter your email address');return false;}
document.forms[0].submit();
}


// -- launch webpage
function gotoPage(url){window.location = url}






