Hello Folks,

To start off with ..Im very new to Javascript and Im in the process of learning this language.
I have been trying to create a form using HTML and Javascript.

The form has a number of check boxes.(possibly around 20 or so checks boxes.. The aim of the form is for the user to select the desired number of check boxes and upon clicking the submit button, the links associated with the checked check boxes should open in multiple tabs of the browser .
If no check box is selected a message box should prompt the user to check atleast one... I hope im making sense..

I have added my code below for reference
<title>Checkbox Project</title>
<script type="text/javascript" language="javascript">
<!-- //
function CheckCheckboxes(){
    var elLength = document.MyForm.elements.length;

    for (i=0; i<elLength; i++)
        var type = MyForm.elements[i].type;
        if (type=="checkbox" && MyForm.elements[i].checked){
            alert("Form element in position " + i + " is of type checkbox and is checked.");
        else if (type=="checkbox") {
            alert("Form element in position " + i + " is of type checkbox and is not checked.");
        else {
// -->
<form action="">
<table align="left" border="1" style="border-collapse: collapse;">

    <tr style="height:30px">
        <td colspan="8"><center>Companies</center></td>
         <td><input type="checkbox" name="Google" onclick="if(this.checked){OpenWindow(this.value)}"value="www.google.com">Google </td> 
         <td><input type="checkbox" name="Apple" onclick="if(this.checked){OpenWindow(this.value)}"value="www.apple.com">Apple </td> 
         <td><input type="checkbox" name="Microsoft" onclick="if(this.checked){OpenWindow(this.value)}"value="www.Microsoft.com">Microsoft </td> 
         <td><input type="checkbox" name="facebook" onclick="if(this.checked){OpenWindow(this.value)}"value="www.facebook.com">Facebook </td> 
	 <td><br /><input type="submit" value="Send Form" onclick="CheckCheckboxes()"/></td>
Any help on the my above request is appreciated ...