Q:

Script wont call function in Google Chrome

I have a script that pops up a div element when a anchor tag is clicked
echo '<a href="javascript:void(0);" onclick="popup(\'yme-property-pop\'); loadproperties(\'open\', \''.$row['id'].'\');"><h2>' .  $row['placename'] . ' </h2></a>';

It's echoed from a PHP script, and is working fine in FF and IE(9). 
But chrome won't run it, atleast on ver.  18.0.1025.168 m
The popup(divid); event fires when I click it, but it doesent complete the function calling inside the script the function is in. 
            var width_ratio = 0.4; // If width of the element is 80%, this should be 0.2 so that the element can be centered

    function toggle(div_id) {
        var el = document.getElementById(div_id);
        if ( el.style.display == 'none' ) { el.style.display = 'block';}
        else {el.style.display = 'none';}
    }
    function blanket_size(popUpDivVar) {
                    alert(popUpDivVar);
        if (typeof window.innerWidth ! = 'undefined') {
            viewportheight = window.innerHeight;
        } else {
            viewportheight = document.documentElement.clientHeight;
        }
        if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
            blanket_height = viewportheight;
        } else {
            if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
                blanket_height = document.body.parentNode.clientHeight;
            } else {
                blanket_height = document.body.parentNode.scrollHeight;
            }
        }
        var blanket = document.getElementById('blanket');
        blanket.style.height = blanket_height + 'px';
        var popUpDiv = document.getElementById(popUpDivVar);
        popUpDiv_height=0;
        popUpDiv.style.top = popUpDiv_height + 'px';
    }
    function window_pos(popUpDivVar) {
        if (typeof window.innerWidth ! = 'undefined') {
            viewportwidth = window.innerHeight;
        } else {
            viewportwidth = document.documentElement.clientHeight;
        }
        if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
            window_width = viewportwidth;
        } else {
            if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
                window_width = document.body.parentNode.clientWidth;
            } else {
                window_width = document.body.parentNode.scrollWidth;
            }
        }
        var popUpDiv = document.getElementById(popUpDivVar);
        window_width=window_width/2;
        window_width = window_width * width_ratio; 
        popUpDiv.style.left = window_width + 'px';
    }
    function popup(windowname) {
                    alert(windowname); // THIS WORKS
        blanket_size(windowname);
        window_pos(windowname);
        toggle('blanket');
        toggle(windowname);     
    }   

The last function in that script is the one that is called first.  I put an alert box in it to verify that it was fired.  BUT, I put an alert box in the next function that it calls (blanket_size), and it did not fire, as I had the alert box on the first line in the function.  It did not fire. 
I simply have no clue why.  The weird thing is that this stuff works in other browsers, but not chrome.  Any ideas? 
Thanks! 
Edit: And I also verified that the parameter value passed into the popup() function (the 'windowname' param) is valid/has a value.  It contains the ID of a DIV that is in the HTML document, and it's not dynamically created. 
Edit 2: Ok, I got the script running when and ONLY when I add an alert box with the parameter value in it (windowname) to the popup(windowname) function.  But if I remove that box, it stops working again. 
Edit 3:
Got no errors on the debugger at all.  But now I'm even more confused.  After a great deal of tries, it seems like it's working with the alert box at random!  Sometimes works, and sometimes not. 
Final Edit
Changed logic to jQuery.  Should have done this long ago! 
    // Open property
$(".property-open-link", ".yme-propertyitem").live('click', function() { 
    $("#yme-property-pop").css({'display': 'block', 'z-index': '9999' });
    $("#blanket").css({'display': 'block', 'height', getBlanketHeight(), 'z-index': '1000' });
    loadproperties('open', $(this).closest(".yme-propertyitem").attr("id"));
});
// Close property button
$("#yme-property-close").live('click', function() { 
    $("#yme-property-pop").css('display', 'none');
    $("#blanket").css('display', 'none');
});

A:

Couple of things to clear up first:

It really helps if you create a way for us to interact with your
code, especially as you've pasted PHP code here, instead of plain
HTML
Is there a reason why you're not using a library to handle your DOM
    interactions?  It will make your code more concise and take away some
    possible failure points when it comes to cross-browser code. 

Right,
I'm a little unsure why your code isn't working in Chrome.  I set up a demo in jsfiddle and it seems to work fine. 
You'll notice I'm not attaching the events in onclick attributes on the <a/> element, and neither should you.  This could be where the problem lies. 
Currently, the code in the jsfiddle alerts as expected and only fails when it fails to find a relevent DOM node in toggle. 
Note:
addEventListener in the example is not cross-browser, which is another reason to use a DOM library.