//trim functionality not working in IE - solution
if(typeof String.prototype.trim !== 'function') {
  String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g, ''); 
  }
}

var disable_colorBox = false;
var str_msg = "";
var keepRows = false;
var popupShowFirstTime = true;
var incr = 0;

jQuery(function($) {
    $('.blink')
        .focus(function(){
            if( $(this).val() == $(this).attr('title') ) {
                $(this).val('');
            }
        })
        .blur(function(){
            if( $(this).val() == '' ) {
                $(this).val( $(this).attr('title') );
            }
        });
        
    $('#navigation > li').hover(function() {
        $(this).css({ 'z-index' : 100 });
        $(this).find('> ul').css({width: $(this).outerWidth()}).show();
        $(this).find('a:eq(0)').addClass('hover');
    }, function() {
        $(this).css({ 'z-index' : 1 });
        $(this).find('> ul').hide();
        $(this).find('a:eq(0)').removeClass('hover');
    });
    $('#navigation li li a').each(function() {
        $(this).html($(this).html().replace(/<\/?span>/, ''));
    });
    
    $('#quote').colorbox({
        inline: true,
        
        onLoad:function(){ 
            if(!disable_colorBox) {
                jQuery("#cboxOverlay").css("display", "block");
                jQuery("#colorbox").css("display", "block");    
            } 
            else {
                jQuery("#cboxOverlay").css("display", "none");
                jQuery("#colorbox").css("display", "none");    
            }
       }
    });
    
    function TransferStep1ToStep2()
    {
        jQuery('#tb_zip_step2').val(jQuery('#tb_zip_step1').val());
        jQuery('#tb_zip_form').val(jQuery('#tb_zip_step1').val());
        jQuery('#ddl_insType_form').val(jQuery('#ddl_insType_step1').val());
        
        if (popupShowFirstTime)
            popupShowFirstTime = false;
        else
            keepRows = true;
        
        resizePopup();
    }
    
    function TransferStep2ToStep1()
    {
        jQuery('#tb_zip_step1').val(jQuery('#tb_zip_step2').val());
        jQuery('#tb_zip_form').val(jQuery('#tb_zip_step2').val());
        
        jQuery("#cboxContent").css("height", "670px");
        jQuery("#cboxLoadedContent").css("height", "670px");
        jQuery("#popup").css("height", "670px");
        jQuery("#colorbox").css("height", "700px");
    }
    
    $('#final').live('click', function () {
        if(isStep1FormValid()) {
            TransferStep1ToStep2();
            $('.step1, .page1').fadeOut();
            $('.step2, .page2').fadeIn();
        }
        else
            alert(str_msg);
            
        return false;
    });
    
    $('#firstStep').live('click', function () {
        TransferStep2ToStep1();
        $('.step2, .page2').fadeOut();
        $('.step1, .page1').fadeIn();
        
        return false;
    });
    
    $('.slider li').simpleFade({
        init : function () {
            fader = this;
        },
        onFade : function (index) {
            $('.sl-nav a').removeClass('active').eq(index).addClass('active');
        }
    });
    
    $('.sl-nav a').click(function () {
        fader.fadeTo($('.sl-nav a').index(this));
        return false;
    });
    
    if($.browser.msie && $.browser.version.substr(0,1) == 6) {
        DD_belatedPNG.fix('#navigation li a:hover, #navigation li a.active, #navigation li a:hover span, #navigation li a.active span, .quote .field, .quote .select, .quote .button, .search .field, .widget h2.heart, .widget h2.rss, .subscribe .field, .subscribe .button, .subscribe .field, .subscribe .button, .btn-verisign img');
    }
    
    $('.testi-list li:last').addClass('last');
    $('#content .entry:last').addClass('entry-last');
    
    $('.box-wide').hover(
        function() {
            if ($(this).find('.hover-img').length) {
                $(this).find('.hover-img').show();
                $(this).find('.default').hide();
            }
        },
        function() {
            if ($(this).find('.hover-img').length) {
                $(this).find('.hover-img').hide();
                $(this).find('.default').show();    
            }
        }   
    );

    $.fn.equalize_height = function() {
        var h = 0;
        var collection = $(this);   
        collection.each(function() {
            if ($(this).height() > h) {
                h = $(this).height();
            }
        });
        collection.each(function() {
            $(this).height(h);
        });
    }
    
    $(window).load(function() {
        $('#content-wrapper, #sidebar').equalize_height();
    })

    keepRows = false;
    addClildrenRows();
    
    jQuery("#cboxContent").css("height", "670px");
    jQuery("#cboxLoadedContent").css("height", "670px");
    jQuery("#cboxLoadedContent").css("width", "600px");
    jQuery("#popup").css("height", "670px");
    jQuery("#colorbox").css("height", "670px");
});

function resizePopup()
{
    jQuery("#cboxContent").css("height", "870px");
    jQuery("#cboxLoadedContent").css("height", "870px");
    jQuery("#popup").css("height", "870px");
    
    addClildrenRows();
}

//takes the zip code and insurance type from the
//main ssi form from home page and sets that values in
//the corresponding fields in the step1 page from the popup window
function getZipAndInsuranceVals() {
    str_msg = "";
    
    var tb_zip_val = jQuery('#tb_zip_form').val();
    var ddl_insType_val = jQuery("#ddl_insType_form").val();
    if (tb_zip_val == "Enter Zip Code" || tb_zip_val.length == 0) 
        str_msg += "Please, provide a valid zip code.\r\n";
    if(ddl_insType_val == '' || ddl_insType_val == 0){
    	str_msg += "Please, select Insurance Type.\r\n";
    }
    
    //if (ddl_insType_val == "0")
    //    str_msg += "Please, select a valid insurance type.\r\n";
    
    if (str_msg == "")
    {
        //jQuery('#tb_zip_step1').val(tb_zip_val);
        //jQuery("#ddl_insType_step1").val(ddl_insType_val);
        //jQuery("a:[name='quote']").attr("id", "quote");
        //jQuery("#popup").attr("href", "#popup");
        //disable_colorBox = false;
        
        //jQuery('.step2, .page2').hide();
        //jQuery('.step1, .page1').show();
    	disable_colorBox = true;
    	jQuery('#frm_quoting').submit();
    }
    else
    {
        alert(str_msg);
        disable_colorBox = true;
    }
}

//add N children rows depending on the selected number of children
function addClildrenRows(){
    if (!keepRows)
    {
        incr = 0;
        var numChildren = jQuery("#ddl_numChildren").val();
        jQuery("#div_children").html("");
        numChildren = new Number(numChildren);
        var ch_row_h = 35;
        for (var i=1; i<=numChildren;i++)
        {
            var str_prevHtml = jQuery("#div_children").html();
            var str_html = "<label>Child " + i + "*</label>" + 
                            "<select id='ddl_genderChild_" + i + "'>" + 
                            "<option value='male'>Male</option>" +
                            "<option value='female'>Female</option>" +
                            "</select>" +
                            "<label>Birth Date:</label>" +
                            "<input id='tb_bDate1_child_" + i + "' name='tb_bDate1_child_" + i + "' type='text' class='field field2' maxlength='2' value='' onkeyup='checkInteger(this);' />" +
                            "<input id='tb_bDate2_child_" + i + "' name='tb_bDate2_child_" + i + "' type='text' class='field field2' maxlength='2' value='' onkeyup='checkInteger(this);' />" +
                            "<input id='tb_bDate3_child_" + i + "' name='tb_bDate3_child_" + i + "' type='text' class='field field2' maxlength='4' value='' onkeyup='checkInteger(this);' />" +
                            "<div class='cl'>&nbsp;</div>";
                
            jQuery("#div_children").html(str_prevHtml + str_html);
            incr += ch_row_h;
        }
    }
    
    //var holderHeight = new String(numChildren*30);
    //jQuery("#div_holder").css("height", holderHeight + "px");
    //alert(jQuery("#div_holder").css("height"));
    
    var temp_h = new String(824 + incr);
    jQuery("#popup").css("height", temp_h + "px");
    
    temp_h = new String(924 + incr);
    jQuery("#cboxLoadedContent").css("height", temp_h + "px");
    
    temp_h = new String(780 + incr);
    jQuery("#cboxContent").css("height", temp_h + "px");
    
    temp_h = new String(912 + incr);
    jQuery("#cboxWrapper").css("height", temp_h + "px");
    
    jQuery("#colorbox").css("height", "880px");
}             

//http post executing function
function doPost()
{
    jQuery.ajax({
                  type: 'POST',
                  contentType: "application/json; charset=utf-8",
                  url: 'https://www.brokeroffice.com/quote/prepopulation?login=scottl@ssiinsure.com',
                  data: "{'zip':'" + "84663" + "','gender':'" + "M" + "','dob':'" + "01/11/1981" + "'}",
                  
                  async: false,
                  dataType: "XML",

                  success: function(data)
                  {
                    alert('success!!');
                  }
                });
}

//submit data to the specified url
function postSubmData()
{
    if (isStep2FormValid())
    {
        jQuery('#tb_zip_step1').val(jQuery('#tb_zip_step2').val());
        jQuery('#tb_zip_form').val(jQuery('#tb_zip_step2').val());
        
        //var url_addr = 'http://www.brokeroffice.com/quote/quotes.jsp?login=scottl@ssiinsure.com&page=Quote&_method=post';
        var url_addr = 'https://www.brokeroffice.com/quote/prepopulation?login=scottl@ssiinsure.com';
        
        url_addr += ('&zip=' + jQuery("#tb_zip_step2").val());
        url_addr += ('&firstName=' + jQuery("#firstName").val()); //'&firstName=Tester';
        url_addr += ('&lastName=' + jQuery("#lastName").val()); //'&lastName=Norvax';
        url_addr += ('&email=' + jQuery("#tb_email").val()); //'&email=test@norvax.com';
        url_addr += ('&state=' + jQuery("#state").val()); //'&state=IL';
        
        var temp_bDate = jQuery("#birthDate1").val() + "/" + jQuery("#birthDate2").val() + "/" + jQuery("#birthDate3").val();
        if (temp_bDate != "//")
            url_addr += ('&applicant_dob=' + temp_bDate); //'&applicant_dob=01/01/1980';
            
        url_addr += ('&applicant_gender=' + jQuery("#gender").val());
        url_addr += ('&applicant_heightFT=' + jQuery("#tb_app_h_ft").val());
        url_addr += ('&applicant_heightIN=' + jQuery("#tb_app_h_in").val());
        url_addr += ('&applicant_weight=' + jQuery("#tb_app_w").val());
        url_addr += ('&applicant_smoker=' + jQuery('input[name=grp2]:checked').val());
        
        //additional (according to the list from: http://support.brokeroffice.com/kb/question.php?ID=89)
        //url_addr += ('&work_phone=' + jQuery("#??").val());
        //url_addr += ('&evening_phone=' + jQuery("#??").val());
        //url_addr += ('&fax=' + jQuery("#??").val());
        //url_addr += ('&address1=' + jQuery("#??").val());
        //url_addr += ('&address2=' + jQuery("#??").val());
        url_addr += ('&city=' + jQuery("#city").val());
        //url_addr += ('&selEffDate=' + jQuery("#??").val());
        
        if (jQuery("#grp1_Yes").attr("checked") == true)
        {            
            var temp_spouse_dob = jQuery("#birthDateStep2_2").val() + "/" + jQuery("#birthDateStep2_1").val() + "/" + jQuery("#birthDateStep2_3").val();
            if (temp_spouse_dob != "//")
                url_addr += ('&spouse_dob=' + temp_spouse_dob);
            
            url_addr += ('&spouse_gender=' + jQuery("#spouse").val());
            url_addr += ('&spouse_heightFT=' + jQuery("#tb_sp_h_ft").val());
            url_addr += ('&spouse_heightIN=' + jQuery("#tb_sp_h_in").val());
            url_addr += ('&spouse_weight=' + jQuery("#tb_sp_w").val());
            url_addr += ('&spouse_smoker=' + jQuery('input[name=grp3]:checked').val());
        }
        
        var numChildren = new Number(jQuery("#ddl_numChildren").val());
        
        if (numChildren > 0)
            for (var i = 1; i <= numChildren; i++)
            {
                url_addr += ('&dependent' + i + '_gender=' + jQuery("#ddl_genderChild_" + i).val());
                
                var dob_child = jQuery("#tb_bDate2_child_" + i).val() + "/" + jQuery("#tb_bDate1_child_" + i).val() + "/" + jQuery("#tb_bDate3_child_" + i).val();
                url_addr += ('&dependent' + i + '_dob=' + dob_child);
                //url_addr += ('&dependent1_height_ft=' + jQuery("#??").val());
                //url_addr += ('&dependent1_height_in=' + jQuery("#??").val());
                //url_addr += ('&dependent1_weight=' + jQuery("#??").val());
                //url_addr += ('&dependent1_student=' + jQuery("#??").val());
            }
        
        //document.write(url_addr);
        switch (jQuery("#ddl_insType_step1").val()) {
        case '2':
        	prod = 'Individual Health';
        	jQuery('#href_viewQuotes').attr('href', url_addr);
        	break;
        case '1':
        	prod = 'Med Supp';
        	jQuery('#href_viewQuotes').attr('href', 'https://public.hcsc.net/medicaresupp/xpress-passthru.do?agent=MDAwMDAwMDAwOBZbAFEjLRqm13/zrtetFA9KcmrgjaJF+ya8hY73b5/I');
        	break;
		case '3':
			prod = 'Life Insurance';
			break;
		default:
			prod = 'None';
			alert("Please select Insurance Type");
			return;
			break;
		}
        
        //submit to the CRM system
        var data = {
            first_name: jQuery("#firstName").val(),
            last_name: jQuery("#lastName").val(),
            phone: jQuery("#phone1").val() + '-' + jQuery("#phone2").val() + '-' + jQuery("#phone3").val(),
            email: jQuery("#tb_email").val(),
            zip: jQuery("#tb_zip_step2").val(),
            dob: temp_bDate,
            gender: jQuery("#gender").val(),
            product: prod,
            campaign: ''
        };
        jQuery.post('./crm.php',data,function(){
        	if(jQuery("#ddl_insType_step1").val()=='3'){
        		location.href = '/thankyou';
        	}else{
        		location.href = 'index.php';
        	}
        });
        
        /*var form = document.createElement("form");
        form.setAttribute("method", "POST");
        form.setAttribute("action", "https://insure.insidesales.com/do=noauth/add_lead/14");
        
        var fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "first_name");
        fld.setAttribute("value", jQuery("#firstName").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "last_name");
        fld.setAttribute("value", jQuery("#lastName").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "phone");
        fld.setAttribute("value", jQuery("#phone1").val() + '-' + jQuery("#phone2").val() + '-' + jQuery("#phone3").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "email");
        fld.setAttribute("value", jQuery("#tb_email").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "zip");
        fld.setAttribute("value", jQuery("#tb_zip_step2").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "dob");
        fld.setAttribute("value", temp_bDate);
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "gender");
        fld.setAttribute("value", jQuery("#gender").val());
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "product");
        fld.setAttribute("value", "Med Supp");
        form.appendChild(fld);
        fld = document.createElement("input");
        fld.setAttribute("type", "hidden");
        fld.setAttribute("name", "campaign");
        fld.setAttribute("value", "");
        form.appendChild(fld);

        document.body.appendChild(form);
        form.submit();*/
                
        return true;
    }
    else
    {
        alert(str_msg);
        return false;
    }
}


//checks if the form from Step 1 valid 
//(i.e. with all required fields provided with valid data)
function isStep1FormValid() {
    str_msg = "";
    
    if (jQuery("#firstName").val().length == 0)
        str_msg += "Please, provide first name\r\n";
    if (jQuery("#lastName").val().length == 0)
        str_msg += "Please, provide last name\r\n";
    if (jQuery("#street").val().length == 0)
        str_msg += "Please, provide street\r\n";
    if (jQuery("#city").val().length == 0)
        str_msg += "Please, provide city\r\n";
    if (jQuery("#state").val().length == 0)
        str_msg += "Please, select a state\r\n";
    if (jQuery("#tb_zip_step1").val().length == 0)
        str_msg += "Please, provide a valid zip code\r\n";
    if (jQuery("#phone1").val().length == 0 || jQuery("#phone2").val().length == 0 || jQuery("#phone3").val().length == 0)
        str_msg += "Please, provide a valid phone number\r\n";
    if (jQuery("#tb_email").val().length == 0 || !isValidEmail(jQuery("#tb_email").val()))
        str_msg += "Please, provide a valid e-mail address\r\n";
    if (jQuery("#ddl_insType_step1").val().length == 0)
        str_msg += "Please, select an insurance type\r\n";

    if (str_msg != "")    
        return false;
    else
        return true;
}


//checks if the form from Step 2 valid 
//(i.e. with all required fields provided with valid data)
function isStep2FormValid() {
    str_msg = "";
    
    if (jQuery("#tb_zip_step2").val().length == 0)
        str_msg += "Please, provide a valid zip code\r\n";
    
    var appBDate = jQuery("#birthDate2").val() + "/" + jQuery("#birthDate1").val() + "/" + jQuery("#birthDate3").val();
    if (appBDate == "//" || !isDate(appBDate))
        str_msg += "Please, provide a valid date for Your birth date in format mm/dd/yyyy\r\n";
        
    if (!isDate(jQuery("#startDate2").val() + "/" + jQuery("#startDate1").val() + "/" + jQuery("#startDate3").val()))
        str_msg += "Please, provide a valid coverage start date in format mm/dd/yyyy or leave the field empty\r\n";        

    if (jQuery("#grp1_Yes").attr("checked") == true)
    {
        var spouseDate = jQuery("#birthDateStep2_2").val() + "/" + jQuery("#birthDateStep2_1").val() + "/" + jQuery("#birthDateStep2_3").val();
        
        if (!isDate(spouseDate) || spouseDate == "//")
            str_msg += "Please, provide a valid spouse birth date in format mm/dd/yyyy\r\n";
    }
    
    //check children birth dates
    checkChBirthDates();
    
    if (str_msg != "") 
        return false;
    else
        return true;
}


//clears the specified text box value 
//from non-integer characters
function checkInteger(obj) {
    obj.value = obj.value.replace (/\D+/, '');
}


//checks the value if it is valid e-mail address
function isValidEmail(str) {
    return /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(str);
}


// ******************************************************************
// This function accepts a string variable and verifies if it is a
// proper date or not. It validates format matching either
// mm-dd-yyyy or mm/dd/yyyy. Then it checks to make sure the month
// has the proper number of days, based on which month it is.

// The function returns true if a valid date, false if not.
// ******************************************************************
function isDate(dateStr) {
    if (dateStr.replace("//", "").length == 0)
        return true;
    
    var isValidDate = true;
    var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
    var matchArray = dateStr.match(datePat); // is the format ok?
    
    if (matchArray == null)
        isValidDate = false;
    else
    {
        month = matchArray[3]; // parse date into variables
        day = matchArray[1];
        year = matchArray[5];
        
        if (month < 1 || month > 12)
            isValidDate = false;
        
        if (day < 1 || day > 31)
            isValidDate = false;
        
        if ((month==4 || month==6 || month==9 || month==11) && day==31)
            isValidDate = false;
        
        if (month == 2) { // check for february 29th
            var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
            
            if (day > 29 || (day==29 && !isleap))
                isValidDate = false;
        }
    }
    
    return isValidDate;
}


//checks validity of the children birth dates
function checkChBirthDates() {
    var numChildren = jQuery("#ddl_numChildren").val();

    if (numChildren > 0)
        for (var i=1; i <= numChildren; i++)
        {
            var tempDate = jQuery("#tb_bDate2_child_" + i).val() + "/" + 
                           jQuery("#tb_bDate1_child_" + i).val() + "/" + 
                           jQuery("#tb_bDate3_child_" + i).val();
                
            if (!isDate(tempDate))
            {
                str_msg += "Please, provide a valid birth date of Child " + 
                           i + " in format mm/dd/yyyy or leave the field empty\r\n";
            }
        }
}


//Decimal numbers only
function DecimalNumber(e, text_box) 
{   
    var tb_value=new String(text_box.value);

    var iKeyCode = 0; 
    if (window.event) 
        iKeyCode = window.event.keyCode 
    else
        if (e) 
            iKeyCode = e.which;
    
    if (iKeyCode == 190 || iKeyCode == 110)
    {
        var comma_found=false;
        var k;
        for(k=0; k<tb_value.length; k++)
        {
            if (tb_value.charAt(k)=='.')
            {
                comma_found=true;
                break;
            }
        }
        
        if(comma_found==true)
            return false;
    }
    else
    if(iKeyCode!=8 && iKeyCode!=16 && iKeyCode!=17 && iKeyCode!=18 && 
        iKeyCode!=37 && iKeyCode!=39 && iKeyCode!=36 && iKeyCode!=190 && iKeyCode!=110 && iKeyCode!=9)
        {
            if(iKeyCode>=96 && iKeyCode<=105)
            {
                
            }
            else
                if(iKeyCode>=48 && iKeyCode<=57)
                {
                    
                }
            else
            {
            
                var temp_str="";
                var last_char;
                var i;
                for(i=0; i<tb_value.length; i++)
                {
                    last_char=tb_value.charAt(i);
                    
                    if((last_char=='0'||last_char=='1'||
                        last_char=='2'||last_char=='3'||
                        last_char=='4'||last_char=='5'||
                        last_char=='6'||last_char=='7'||
                        last_char=='8'||last_char=='9'||
                        last_char=='.'))
                    {
                        temp_str+=last_char;
                    }
                }
            
                text_box.value=temp_str;
                tb_value=new String(text_box.value);
            }
        }
    
    if(tb_value.length>0)
    {
        var first_two_chars=tb_value.substring(0,2);
        if(first_two_chars=="00")
        {
            tb_value=tb_value.substring(1,tb_value.length);
            text_box.value=tb_value;
        }
    }
}


// Remove first zero, first and last comma '.'
function RemoveCommas(text_box) 
{  
    var tb_value=new String(text_box.value);
    var temp_str = "";
    var temp_char = ' ';
    
    for(i=0; i<tb_value.length; i++)
    {
        temp_char=tb_value.charAt(i);
        
        if((temp_char=='0'||temp_char=='1'||
            temp_char=='2'||temp_char=='3'||
            temp_char=='4'||temp_char=='5'||
            temp_char=='6'||temp_char=='7'||
            temp_char=='8'||temp_char=='9'||
            temp_char=='.'))
        {
            temp_str+=temp_char;
        }
    }

    tb_value=temp_str;

    if(tb_value.length>=2&&tb_value.charAt(0)=='0'&&tb_value.charAt(1)!='.')
    {
        tb_value=tb_value.substring(1,tb_value.length);
    }
    
    if(tb_value.charAt(tb_value.length-1)=='.')
    {
        tb_value=tb_value.substring(0,tb_value.length-1);
        
    }
    
    if(tb_value.charAt(0)=='.')
    {
        tb_value=tb_value.substring(1,tb_value.length);
    }
    
    text_box.value=tb_value;
}

// Verisign Pop Up
function showVerisignPopup(site)
{
     //The url of the splash site.  
     var url1 = 'https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=';
	 //var url1 = 'https://seal.verisign.com/getseal?host_name=';
     var url2 = '&lang=en';
     //The width and height are set to give enough room for languages like spanish that take up more room.
     //Set the menubar to yes to display the menu bar.
     var completeUrl = url1 + site + url2;  
     //window.open(url1 + site + url2, 'VerisignPopUp', 'width=550, height=450, menubar=no, resizable=no');
     sw = window.open(completeUrl,'VRSN_Splash','location=yes,status=yes,resizable=yes,scrollbars=yes,width=560,height=500');
     sw.focus();
}
