Change the code like @Abimbola says, and in case that the $orderId and the $store be strings, change:
var order = <?php echo $orderid; ?>;
var store = <?php echo $store; ?>;
To this:
var order = "'" + <?php echo $orderid; ?> + "'";
var store = "'" + <?php echo $store; ?> + "'";